anavallasuiza/laravel-admin

Simple and extendible Laravel control panel

6.0.0 2019-10-04 19:26 UTC

This package is auto-updated.

Last update: 2024-11-09 06:06:43 UTC


README

Starting a base to base admin managemet based in database tables.

Thanks to https://github.com/almasaeed2010/AdminLTE to this great Admin CSS/Javascript/HTML Theme.

Installation

Begin by installing this package through Composer.

{
    "require": {
        "anavallasuiza/laravel-admin": "5.1.*"
    }
}

Configure Laravel Service Providers/Aliases in config/app.php:

'providers' => [
    ...

    Admin\AdminServiceProvider::class,

    ...
]

'aliases' => [
   ...

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

   ...
]

Configure app/Http/Kernel.php with Middlewares:

/**
 * 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,
];

Publish the base admin configuration:

php artisan vendor:publish

Publish admin assets with:

php artisan admin:publish:assets

Mirate admin tables

php artisan migrate

And finally, create your first admin user:

php artisan admin:user:new --name Admin --user admin --password admin --admin true

Check now to login into http://mydomain.com/admin

Laravel 5.4

Gettext admin Translator use __ functions added now on Laravel 5.4

To use this admin on Laravel >=5.4 add this line to bootstrap/autoload.php project file:

require __DIR__.'/../vendor/gettext/gettext/src/translator_functions.php'; # Add this line
require __DIR__.'/../vendor/autoload.php';