PHP code example of anavallasuiza / laravel-admin

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

    

anavallasuiza / laravel-admin example snippets


'providers' => [
    ...

    Admin\AdminServiceProvider::class,

    ...
]

'aliases' => [
   ...

   'Input' => Illuminate\Support\Facades\Input::class,

   ...
]

/**
 * The application's route middleware groups.
 *
 * @var array
 */
protected $middlewareGroups = [
    ...

    'admin' => [
        \App\Http\Middleware\EncryptCookies::class,
        \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
        \Illuminate\Session\Middleware\StartSession::class,
        \Illuminate\View\Middleware\ShareErrorsFromSession::class,
        \App\Http\Middleware\VerifyCsrfToken::class,
    ]
];

protected $routeMiddleware = [
    ...

    'admin.auth' => \Admin\Http\Middleware\Authenticate::class,
    'admin.admin' => \Admin\Http\Middleware\Admin::class,
];


bash
php artisan vendor:publish
bash
php artisan admin:publish:assets
bash
php artisan migrate