$route) { $data = ['name' => $key, 'guard_name' => 'api']; Permission::firstOrCreate($data); } } }