PHP code example of gogilo / admin-md

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

    

gogilo / admin-md example snippets


Ogilo\AdminMd\AdminServiceProvider::class,

if(is_admin_path()){
    return redirect()->guest('admin/login');
}

'admins' => [
    'driver' => 'eloquent',
    'model' => Ogilo\AdminMd\Models\Admin::class,
],

'admin' => [
    'driver' => 'session',
    'provider' => 'admins',
],

'api' => [
    'driver' => 'token',
    'provider' => 'admins',
    'hash' => false,
],

php artisan admin:fix_route

Route::group(['middleware'=>'auth:admin','prefix'=>'admin','as'=>'admin'],function(){
    Route::get('',['as'=>'-example','uses'=>'SomeController@someMethod']);
});

class AppServiceProvider{
    ...
    function boot(){
        config(['admin.menu.admin-example'=>'Examples']);
    }
    ...
}

function boot(){
        config(['admin.menu.admin-example'=>[
            [
                'caption'=>'Menu One',
                'submenu'=>[
                    'menu-one-route-name-one'=>'Caption One',
                    'menu-one-route-name-two'=>'Caption Two',
                    'menu-one-route-name-three'=>'Caption Three',
                    'menu-one-route-name-four'=>'Caption Four',
                ]
            ],[
                'caption'=>'Menu Two',
                'submenu'=>[
                    'menu-two-route-name-one'=>'Menu 2 Caption One',
                    'menu-two-route-name-two'=>'Menu 2 Caption Two',
                    'menu-two-route-name-three'=>'Menu 2 Caption Three',
                    'menu-two-route-name-four'=>'Menu 2 Caption Four',
                    'menu-two-route-name-five'=>'Menu 2 Caption Five',
                ]
            ]
        ]]);
    }

function boot(){
    config(['admin.menu.admin-example'=>
        [
            'caption'=>'Menu One',
            'submenu'=>[
                'menu-one-route-name-one'=>'Caption One',
                'menu-one-route-name-two'=>'Caption Two',
                'menu-one-route-name-three'=>'Caption Three',
                'menu-one-route-name-four'=>'Caption Four',
            ]
        ]
    ]);
}

'-'=>'-'

'submenu'=>[
        'menu-one-route-name-one'=>'Caption One',
        'menu-one-route-name-two'=>'Caption Two',
        '-'=>'-',
        'menu-one-route-name-three'=>'Caption Three',
        'menu-one-route-name-four'=>'Caption Four',
    ]

@extends('admin::layout.main')

@section('title')
    Title
@endsection

@section('page_title')
    <i class="fa fa-list-alt"></i> Item
@endsection

@section('breadcrumbs')
    @parent
    <li class="active"><span><i class="fa fa-list-alt"></i> Item</span></li>
@endsection

@section('sidebar')
    @parent
    {{-- @tion

// app/Console/Kernel.php
protected function schedule(Schedule $schedule)
{
    ...
    $schedule->command('sitemap:generate')->daily();
    ...
}
bash
php artisan admin:fix_exception
bash
php artisan admin:install
bash
php artisan admin:update
bash
php artisan vendor:publish --tag=vue-resources
bash
php artisan sitemap:generate