- Complete GGZ Ecademy Laravel backend application - RESTful API for learning products, members, filters - Authentication and authorization system - Database migrations and seeders - Custom CRUD generator commands - Email notification system - Integration with frontend applications
This commit is contained in:
31
database/seeds/SynonymSeeder.php
Normal file
31
database/seeds/SynonymSeeder.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Services\SynonymService;
|
||||
|
||||
class SynonymSeeder extends Seeder
|
||||
{
|
||||
|
||||
private $synonymService;
|
||||
|
||||
public function __construct(SynonymService $synonymService)
|
||||
{
|
||||
$this->synonymService = $synonymService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$synonyms = ['Medicijnen', 'Medicatie', 'Therapie', 'Remedie'];
|
||||
|
||||
foreach ($synonyms as $synonym) {
|
||||
|
||||
$data = ['title' => $synonym];
|
||||
$this->synonymService->save($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user