. */ declare(strict_types=1); use FireflyIII\Models\Role; use Illuminate\Database\Seeder; /** * Class PermissionSeeder */ class PermissionSeeder extends Seeder { public function run() { $roles = [ [ 'name' => 'owner', 'display_name' => 'Site Owner', 'description' => 'User runs this instance of FF3', ], [ 'name' => 'demo', 'display_name' => 'Demo User', 'description' => 'User is a demo user', ], ]; foreach ($roles as $role) { try { Role::create($role); } catch (PDOException $e) { Log::info(sprintf('Could not create role "%s". It might exist already.', $role['display_name'])); } } } }