PHP code example of laravelui5 / auth

1. Go to this page and download the library: Download laravelui5/auth library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

laravelui5 / auth example snippets


// routes/web.php
Route::get('/', HomeController::class)->name('home');   // public; logout lands here

Route::get('/dashboard', /* your post-login landing */)
    ->middleware('auth')                                // guests bounce to /login
    ->name('dashboard');

new RedirectIntent(session()->pull('url.intended', route('dashboard')));

// In a service provider
$this->app->singleton(
    \LaravelUi5\Auth\Contracts\IntentDispenserInterface::class,
    \App\Auth\MyIntentDispenser::class,
);