Create SourceSeeder.php
This commit is contained in:
31
database/seeds/SourceSeeder.php
Normal file
31
database/seeds/SourceSeeder.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
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()
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
foreach ($sources as $source) {
|
||||||
|
DB::table('sources')->insert($source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user