1. Go to this page and download the library: Download jalallinux/laravel-shield 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/ */
jalallinux / laravel-shield example snippets
// Use on your routes.
Route::get('/', ['middleware' => 'shield'], function () {
// Your protected page.
});
// Use it within your controller constructor.
$this->middleware('shield');
// Use specific user credentials.
$this->middleware('shield:jalallinux');