mirror of
https://github.com/brian8544/turtle-wow.git
synced 2024-12-31 20:04:35 +00:00
39 lines
765 B
PHP
39 lines
765 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use TCG\Voyager\Models\Permission;
|
|
|
|
class PermissionsTableSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Auto generated seed file.
|
|
*/
|
|
public function run()
|
|
{
|
|
$keys = [
|
|
'browse_admin',
|
|
'browse_bread',
|
|
'browse_database',
|
|
'browse_media',
|
|
'browse_compass',
|
|
];
|
|
|
|
foreach ($keys as $key) {
|
|
Permission::firstOrCreate([
|
|
'key' => $key,
|
|
'table_name' => null,
|
|
]);
|
|
}
|
|
|
|
Permission::generateFor('menus');
|
|
|
|
Permission::generateFor('roles');
|
|
|
|
Permission::generateFor('users');
|
|
|
|
Permission::generateFor('settings');
|
|
}
|
|
}
|