Esempio n. 1
0
|--------------------------------------------------------------------------
|
| Hook into the installation / upgrading of your Platform installation
|
*/
Installer::before(function () {
    // Called before Platform is to be installed
});
Installer::after(function () {
    // Called after Platform has been installed
    // If we have the platform/menus extension installed, we'll
    // set the order of the admin menu according to the
    // specific application requirements.
    if (class_exists('Platform\\Menus\\Models\\Menu')) {
        set_menu_order('admin', Config::get('platform.admin.menu'));
        set_menu_order('main', Config::get('platform.frontend.menu'));
    }
});
/*
|--------------------------------------------------------------------------
| Platform Hooks
|--------------------------------------------------------------------------
|
| Hooks for events of Platform itself.
|
*/
Platform::booting(function ($platform) {
    // Before Platform and it's extensions have booted
});
Platform::booted(function ($platform) {
    // When everything is setup and ready to roll
Esempio n. 2
0
|--------------------------------------------------------------------------
|
| Hook into the installation / upgrading of your Platform installation
|
*/
Installer::before(function () {
    // Called before Platform is to be installed
});
Installer::after(function () {
    // Called after Platform has been installed
    // If we have the platform/menus extension installed, we'll
    // set the order of the admin menu according to the
    // specific application requirements.
    if (class_exists('Platform\\Menus\\Models\\Menu')) {
        set_menu_order('admin', config('platform.admin.menu'));
        set_menu_order('main', config('platform.frontend.menu'));
    }
    // Create the registered role
    $registeredRole = app('sentinel')->getRoleRepository()->createModel();
    $registeredRole->fill(['slug' => 'registered', 'name' => 'Registered']);
    $registeredRole->save();
});
/*
|--------------------------------------------------------------------------
| Platform Hooks
|--------------------------------------------------------------------------
|
| Hooks for events of Platform itself.
|
*/
Platform::booting(function ($platform) {