Current File : //home/tradevaly/demo.tradevaly.com.bd/database/seeders/PermissionTableSeeder.php |
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Permission;
class PermissionTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$permissions = [
'role-list',
'role-create',
'role-edit',
'role-delete',
'role-active-inactive',
'product-category-list',
'product-category-create',
'product-category-edit',
'product-category-delete',
'product-category-active-inactive',
'product-list',
'product-create',
'product-edit',
'product-delete',
'product-active-inactive',
'news-category-list',
'news-category-create',
'news-category-edit',
'news-category-delete',
'news-category-active-inactive',
'news-tag-list',
'news-tag-create',
'news-tag-edit',
'news-tag-delete',
'news-tag-active-inactive'
];
foreach ($permissions as $permission) {
Permission::create(['name' => $permission]);
}
}
}