Package Data | |
---|---|
Maintainer Username: | morningtrain |
Maintainer Contact: | mail@morningtrain.dk (Morning Train) |
Package Create Date: | 2017-02-02 |
Package Last Update: | 2017-05-15 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-14 15:19:14 |
Package Statistics | |
---|---|
Total Downloads: | 184 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 6 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Admin panel and tools built on top of Laravel 5.4.
composer require morningtrain\foundation
'providers' => [
...
/*
* Foundation Service Providers
*/
\morningtrain\Janitor\JanitorServiceProvider::class,
\morningtrain\Stub\StubServiceProvider::class,
\morningtrain\Crud\CrudServiceProvider::class,
\morningtrain\Themer\ThemerServiceProvider::class,
\morningtrain\Acl\AclServiceProvider::class,
\morningtrain\Admin\AdminServiceProvider::class,
...
],
'aliases' => [
...
/*
* Foundation Facades
*/
'Janitor' => \morningtrain\Janitor\Facades\Janitor::class,
'Crud' => \morningtrain\Crud\Facades\Crud::class,
'Stub' => \morningtrain\Stub\Facades\Stub::class,
'Theme' => \morningtrain\Themer\Facades\Theme::class
...
]
Update your auth configuration user provider to from App\User to App\Models\User
Add the following to your existing authentication controllers
use morningtrain\Admin\Extensions\RedirectsAdmins;
class ... {
use RedirectsAdmins;
...
/**
* @return string
*/
public function redirectPath()
{
return $this->redirectAdmin($this->guard()) ?: $this->redirectTo;
}
}
php artisan janitor:publish --init
php artisan crud:new MyModel --config=admin.crud
Configure migration, model and controller
Register the model into the admin configuration (config/admin.php)
[
'items' => [
...
App\Models\MyModel::class => [
'icon' => '{material-icon}'
]
...
]
]
php artisan admin:update