Base admin package for Laravel 5
-
Install package with composer
composer require za-laravel/laravel-admin:"dev-master"
-
If composer can't find package, try to set
"minimum-stability": "dev"
-
Now append service provider to providers array in config/app.php.
<?php 'providers' => array( 'Illuminate\Foundation\Providers\ArtisanServiceProvider', 'Illuminate\Auth\AuthServiceProvider', ... 'ZaLaravel\LaravelAdmin\LaravelAdminServiceProvider', ), ?>
-
Append view composer service provider to app/config.php
<?php 'providers' => array( 'Illuminate\Foundation\Providers\ArtisanServiceProvider', 'Illuminate\Auth\AuthServiceProvider', ... 'ZaLaravel\LaravelAdmin\LaravelAdminServiceProvider', 'ZaLaravel\LaravelAdmin\LaravelAdminViewComposerServiceProvider', ), ?>
-
Publish assets and config file with
php artisan vendor:publish
-
You will have empty larave-admin.php config and you need to sepecifiy nav items there:
<?php
return [
'nav' => [
[
'title' => 'Users',
'url' => 'user' // equals to /admin/user
]
]
];
In your view you need extend laravel-admin::layout:
@extends('laravel-admin::layout')
And insert your content in content section:
```
@section('content')
...
@endsection
```