Laravel 8 Upgrade
This commit is contained in:
18
database/seeders/DatabaseSeeder.php
Normal file
18
database/seeders/DatabaseSeeder.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$this->call(SourceSeeder::class);
|
||||
}
|
||||
}
|
||||
49
database/seeders/SourceSeeder.php
Normal file
49
database/seeders/SourceSeeder.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class SourceSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$sources = [
|
||||
[
|
||||
'name' => "މިހާރު",
|
||||
'slug' => "mihaaru",
|
||||
'logo' => "https://mihaaru.com/build/assets/images/icons/152x152.png",
|
||||
'url' => "https://mihaaru.com/",
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now()
|
||||
],
|
||||
[
|
||||
'name' => "ތިލަދުން",
|
||||
'slug' => "thiladhun",
|
||||
'logo' => "https://thiladhun.com/wp-content/uploads/2019/08/cropped-fav-2-180x180.png",
|
||||
'url' => "https://thiladhun.com/",
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now()
|
||||
],
|
||||
[
|
||||
'name' => "ސަން",
|
||||
'slug' => "sun",
|
||||
'logo' => "https://sun.mv/public/assets/favicon.png?v=1",
|
||||
'url' => "https://sun.mv/",
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now()
|
||||
]
|
||||
];
|
||||
|
||||
foreach ($sources as $source) {
|
||||
DB::table('sources')->insert($source);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user