/** * Seed different Roles into the database. */ public function run() { foreach (config('nrgi.roles') as $role) { if (!Role::where('name', $role['name'])->first()) { Role::firstOrCreate($role); } } }