blue-twilight/database/seeds/PermissionsSeeder.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-gallery = controls if the album is visible in the gallery
DatabaseSeeder::createOrUpdate('permissions', [
'section' => 'album',
'description' => 'list-gallery',
'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
]);
}
}