PHP code example of remp / laravel-widgets

1. Go to this page and download the library: Download remp/laravel-widgets 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/ */

    

remp / laravel-widgets example snippets


'providers' => [
    // ...
    Remp\LaravelSso\Providers\SsoServiceProvider::class,
    // ...
];

protected $routeMiddleware = [
    // ...
    'auth.jwt' => VerifyJwtToken::class,
    // ...
];

'defaults' => [
    'guard' => 'jwt',
    'passwords' => null,
],

'guards' => [
    // ...
    'jwt' => [
        'driver' => 'jwt',
        'provider' => null,
    ],
    // ...
]

Route::middleware('auth.jwt')->group(function () {
    // ...
    Route::get('ping', 'SystemController@ping')->name('ping');
    Route::resource('foo', 'FooController');
    Route::resource('bar', 'BarController');
    // ...
});

Auth::user() // returns instance of Remp\LaravelSso\Contracts\Jwt\User
Auth::id() // returns current user ID
Auth::check() // checks if user is logged in