DarkFeud
DarkFeud

Reputation: 181

laravel 5.1 Create a table row with migration

I have a question regarding Migrations in Laravel. I have a webapp where only an administrator can create a user, but when first launching the webapp from 0 I have no users and since only and admin can create users in the admin section which is guarded with a password I can't do anything on the webpage.

The question is, when I create I migration, can I create a user with in?

I would do it manually in my DB, but the password is hashed with bcrypt.

If I cant do it with migrations, would you have any other suggestions for me?

Upvotes: 1

Views: 377

Answers (1)

oseintow
oseintow

Reputation: 7371

Use seeders to create the admin user. This is a link on how to create seeder files

Upvotes: 1

Related Questions