<?php

namespace Database\Seeders;

use App\Lib\Constants;
use Spatie\Permission\Models\Permission;
use Illuminate\Database\Seeder;

class PermissionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        foreach(array_merge(Constants::getMenuActions(), Constants::CUSTOM_MENU_ACTIONS) as $item) {
            $permission = Permission::updateOrCreate([
                'name' => $item,
            ]);
        }
    }
}
