admin panel added and comments are working and likes are working
This commit is contained in:
1 parent
72e9439727
commit
a28023c29b
32 files changed
+5077
-2999
No files matched your search
@@ -2,21 +2,129 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// \App\Models\User::factory(10)->create();
|
||||
// Create sample users
|
||||
$user1Id = DB::table('users')->insertGetId([
|
||||
'name' => 'Music Channel',
|
||||
'email' => '[email protected]',
|
||||
'password' => Hash::make('password'),
|
||||
'avatar' => null,
|
||||
'role' => 'user',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
// \App\Models\User::factory()->create([
|
||||
// 'name' => 'Test User',
|
||||
// 'email' => 'test@example.com',
|
||||
// ]);
|
||||
$user2Id = DB::table('users')->insertGetId([
|
||||
'name' => 'Sports Channel',
|
||||
'email' => 'sports@example.com',
|
||||
'password' => Hash::make('password'),
|
||||
'avatar' => null,
|
||||
'role' => 'user',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
$user3Id = DB::table('users')->insertGetId([
|
||||
'name' => 'Entertainment',
|
||||
'email' => '[email protected]',
|
||||
'password' => Hash::make('password'),
|
||||
'avatar' => null,
|
||||
'role' => 'user',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
// Create sample videos
|
||||
// Video 1 - Music type
|
||||
DB::table('videos')->insert([
|
||||
'user_id' => $user1Id,
|
||||
'title' => 'Summer Vibes - Official Music Video',
|
||||
'description' => "Check out our latest summer hit! 🎵\n\n#SummerVibes #Music #2024",
|
||||
'filename' => 'sample-video-1.mp4',
|
||||
'path' => 'public/videos/sample-video-1.mp4',
|
||||
'thumbnail' => null,
|
||||
'duration' => 240,
|
||||
'size' => 15000000,
|
||||
'mime_type' => 'video/mp4',
|
||||
'orientation' => 'landscape',
|
||||
'width' => 1920,
|
||||
'height' => 1080,
|
||||
'status' => 'ready',
|
||||
'visibility' => 'public',
|
||||
'type' => 'music',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
// Video 2 - Match type
|
||||
DB::table('videos')->insert([
|
||||
'user_id' => $user2Id,
|
||||
'title' => 'Championship Finals - Full Match Highlights',
|
||||
'description' => "Watch the exciting championship finals! 🏆\n\n#Championship #Sports #Highlights",
|
||||
'filename' => 'sample-video-2.mp4',
|
||||
'path' => 'public/videos/sample-video-2.mp4',
|
||||
'thumbnail' => null,
|
||||
'duration' => 600,
|
||||
'size' => 35000000,
|
||||
'mime_type' => 'video/mp4',
|
||||
'orientation' => 'landscape',
|
||||
'width' => 1920,
|
||||
'height' => 1080,
|
||||
'status' => 'ready',
|
||||
'visibility' => 'public',
|
||||
'type' => 'match',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
// Video 3 - Generic type
|
||||
DB::table('videos')->insert([
|
||||
'user_id' => $user3Id,
|
||||
'title' => 'Behind the Scenes - Movie Production',
|
||||
'description' => "Go behind the scenes of our latest movie production! 🎬\n\n#BehindTheScenes #Movie #Production",
|
||||
'filename' => 'sample-video-3.mp4',
|
||||
'path' => 'public/videos/sample-video-3.mp4',
|
||||
'thumbnail' => null,
|
||||
'duration' => 180,
|
||||
'size' => 12000000,
|
||||
'mime_type' => 'video/mp4',
|
||||
'orientation' => 'landscape',
|
||||
'width' => 1920,
|
||||
'height' => 1080,
|
||||
'status' => 'ready',
|
||||
'visibility' => 'public',
|
||||
'type' => 'generic',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
// Video 4 - Music type
|
||||
DB::table('videos')->insert([
|
||||
'user_id' => $user1Id,
|
||||
'title' => 'Acoustic Sessions - Live Performance',
|
||||
'description' => "Our live acoustic performance at the studio 🎵\n\n#Acoustic #LiveMusic #Sessions",
|
||||
'filename' => 'sample-video-4.mp4',
|
||||
'path' => 'public/videos/sample-video-4.mp4',
|
||||
'thumbnail' => null,
|
||||
'duration' => 300,
|
||||
'size' => 20000000,
|
||||
'mime_type' => 'video/mp4',
|
||||
'orientation' => 'landscape',
|
||||
'width' => 1920,
|
||||
'height' => 1080,
|
||||
'status' => 'ready',
|
||||
'visibility' => 'public',
|
||||
'type' => 'music',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user