Refresh list status over Reverb with polling fallback, clarify queued vs processing, streamline upload empty states, and seed an admin login.
46 lines
1.1 KiB
PHP
Executable File
46 lines
1.1 KiB
PHP
Executable File
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\Recording;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
use WithoutModelEvents;
|
|
|
|
/**
|
|
* Seed the application's database.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
$email = (string) env('SEED_USER_EMAIL', 'demo@example.com');
|
|
$name = (string) env('SEED_USER_NAME', 'Demo User');
|
|
$password = (string) env('SEED_USER_PASSWORD', 'password');
|
|
|
|
$user = User::query()->updateOrCreate(
|
|
['email' => $email],
|
|
[
|
|
'name' => $name,
|
|
'password' => $password,
|
|
'email_verified_at' => now(),
|
|
],
|
|
);
|
|
|
|
User::query()->updateOrCreate(
|
|
['email' => 'admin@example.com'],
|
|
[
|
|
'name' => 'Admin',
|
|
'password' => 'password',
|
|
'email_verified_at' => now(),
|
|
],
|
|
);
|
|
|
|
Recording::query()
|
|
->whereNull('user_id')
|
|
->update(['user_id' => $user->id]);
|
|
}
|
|
}
|