updated to laravel 11

This commit is contained in:
2024-04-22 18:16:33 +10:00
parent 5fbca80a3c
commit 5b7da699bd
503 changed files with 9672 additions and 73262 deletions

View File

@@ -2,11 +2,15 @@
namespace Database\Seeders;
use App\Models\Location;
use App\Models\Media;
use App\Models\Post;
use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Carbon\Carbon;
use App\Models\Workshop;
use Database\Factories\LocationFactory;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Storage;
class DatabaseSeeder extends Seeder
{
@@ -15,16 +19,27 @@ class DatabaseSeeder extends Seeder
*/
public function run(): void
{
\App\Models\User::factory(40)->create();
// User::factory(10)->create();
\App\Models\User::factory()->create([
'display_name' => 'James Collins',
'first_name' => 'James',
'last_name' => 'Collins',
'email' => 'james@stemmechanics.com.au',
'email_verified_at' => Carbon::now(),
'phone' => '0400 130 190',
'password' => Hash::make('password@12')
User::factory()->create([
'admin' => 1,
'id' => 1,
'firstname' => 'STEMMechanics',
'surname' => '',
'email' => 'admin@stemmechanics.com.au',
]);
Media::factory()->create([
'user_id' => 1,
'name' => 'stemmechanics-logo.png',
'hash' => '36296b5889a358a6440080074f17d45867727969',
'title' => 'STEMMechanics',
'mime_type' => 'image/png',
'size' => Storage::disk('media')->size('36296b5889a358a6440080074f17d45867727969')
]);
Location::factory(10)->create();
Post::factory(25)->create();
Workshop::factory(10)->create();
}
}