PHP code example of matthc / laradmin

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

    

matthc / laradmin example snippets


php artisan vendor:publish

php artisan migrate

php artisan privileges:db:seed

php artisan privileges:db:users

public function handle($request, Closure $next, $guard = null)
{
    if (Auth::guard($guard)->guest()) {
        if ($request->ajax()) {
            return response('Unauthorized.', 401);
        } else {
            return redirect()->guest('[prefix_from_laradmin_setting/login');
        }
    }

    return $next($request);
}