PHP code example of ceedcv-maya / shared-auth-laravel
1. Go to this page and download the library: Download ceedcv-maya/shared-auth-laravel 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/ */
ceedcv-maya / shared-auth-laravel example snippets
// routes/api.php
use Maya\Auth\Middleware\AuthenticateJwt;
use Maya\Auth\Middleware\RequirePermission;
Route::middleware([AuthenticateJwt::class, RequirePermission::class.':users.read'])->group(function () {
Route::get('/me', fn () => auth()->user());
});