39 lines
1.0 KiB
PHP
39 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class PermissionsSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
// album:list = controls if the album is visible in listings
|
|
DatabaseSeeder::createOrUpdate('permissions', [
|
|
'section' => 'album',
|
|
'description' => 'list',
|
|
'is_default' => true,
|
|
'sort_order' => 0
|
|
]);
|
|
|
|
// album:view = controls if the album can be viewed
|
|
DatabaseSeeder::createOrUpdate('permissions', [
|
|
'section' => 'album',
|
|
'description' => 'view',
|
|
'is_default' => true,
|
|
'sort_order' => 20
|
|
]);
|
|
|
|
// album:edit = controls if the album is visible and can be edited in the admin panel
|
|
DatabaseSeeder::createOrUpdate('permissions', [
|
|
'section' => 'album',
|
|
'description' => 'edit',
|
|
'is_default' => true,
|
|
'sort_order' => 10
|
|
]);
|
|
}
|
|
}
|