Pencarian

Senin, 01 Mei 2023

Laravel Register Controller namespace

 <?php


namespace App\Providers;

use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\Facades\Route;

class RouteServiceProvider extends ServiceProvider
{
    /**
     * The path to the "home" route for your application.
     *
     * Typically, users are redirected here after authentication.
     *
     * @var string
     */
    public const HOME = '/home';
    protected $namespace = 'App\Http\Controllers';

    /**
     * Define your route model bindings, pattern filters, and other route configuration.
     */
    public function boot(): void
    {
        $this->configureRateLimiting();

        $this->routes(function () {
            Route::middleware('api')
                ->namespace($this->namespace)
                ->prefix('api')
                ->group(base_path('routes/api.php'));

            Route::middleware('web')
                ->namespace($this->namespace)
                ->group(base_path('routes/web.php'));
        });
    }

    /**
     * Configure the rate limiters for the application.
     */
    protected function configureRateLimiting(): void
    {
        RateLimiter::for('api', function (Request $request) {
            return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
        });
    }
}

Rabu, 22 Maret 2023

Ramadhan 1444

Selamat datang Ramadhan, bulan  yang penuh berkah dan ampunan.

Semoga kita diberi kekuatan untuk beribadah sebaik mungkin dibulan yang penuh dengan kemuliaan ini. 

1 Ramadhan 1444 Hijriah jatuh pada kamis 23 maret 2023

Rabu, 18 Januari 2023

Mengubah Email Pengirim di OJS

Email sender di OJS

Buka file config.inc.php lalu modif bagian berikut:


  • allow_enveloper_sender = On
  • force_default_envelope_sender = On
  • force_dmarc_compliant_from = On
  • default_envelope_sender = youremail@yourdomain.com

Selasa, 25 Oktober 2022

ZIMBRA – UNABLE TO START TLS: SSL CONNECT ATTEMPT FAILED ERROR

 Starting ldap...Done.

Unable to start TLS: SSL connect attempt failed error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed when connecting to ldap master.
Solusi
su - zimbra
zmlocalconfig -e ldap_starttls_required=true
zmlocalconfig -e ldap_starttls_supported=1
zmcontrol restart

Minggu, 09 Oktober 2022

Laravel migration menambah kolom di tabel

Nama tabel students, kolom yang ingin ditambahkan user_id

 php artisan make:migration add_user_id_to_students_table --table=students