mirror of https://github.com/kcal-app/kcal.git
Sync user seeding and README
This commit is contained in:
parent
8300105fe2
commit
0961a37ef2
|
|
@ -46,5 +46,11 @@
|
|||
vendor/bin/sail artisan migrate
|
||||
vendor/bin/sail artisan elastic:migrate
|
||||
|
||||
1. (On first run) Create the initial user.
|
||||
|
||||
vendor/bin/sail artisan db:seed --class UserSeeder
|
||||
|
||||
The default username and password is `admin@kcal.test`.
|
||||
|
||||
Once the application finishing starting, navigate to [http://127.0.0.1:8080](http://127.0.0.1:8080)
|
||||
(or [http://kcal.test:8080](http://kcal.test:8080) if configured).
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace Database\Seeders;
|
|||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class UserSeeder extends Seeder
|
||||
|
|
@ -15,8 +16,8 @@ class UserSeeder extends Seeder
|
|||
{
|
||||
User::factory()->create([
|
||||
'name' => 'Admin',
|
||||
'email' => 'admin@admin.admin',
|
||||
'password' => '$2y$10$Y6AOmxZHpL3ZVCvwhcG1ZOctibIPgOYZyzIuaEqvmaJuZ4Xs.odxu', // Same as email.
|
||||
'email' => 'admin@kcal.test',
|
||||
'password' => Hash::make('admin@kcal.test'),
|
||||
'remember_token' => Str::random(10),
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue