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 migrate
|
||||||
vendor/bin/sail artisan elastic: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)
|
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).
|
(or [http://kcal.test:8080](http://kcal.test:8080) if configured).
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ namespace Database\Seeders;
|
||||||
|
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class UserSeeder extends Seeder
|
class UserSeeder extends Seeder
|
||||||
|
|
@ -15,8 +16,8 @@ class UserSeeder extends Seeder
|
||||||
{
|
{
|
||||||
User::factory()->create([
|
User::factory()->create([
|
||||||
'name' => 'Admin',
|
'name' => 'Admin',
|
||||||
'email' => 'admin@admin.admin',
|
'email' => 'admin@kcal.test',
|
||||||
'password' => '$2y$10$Y6AOmxZHpL3ZVCvwhcG1ZOctibIPgOYZyzIuaEqvmaJuZ4Xs.odxu', // Same as email.
|
'password' => Hash::make('admin@kcal.test'),
|
||||||
'remember_token' => Str::random(10),
|
'remember_token' => Str::random(10),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue