24 lines
418 B
PHP
24 lines
418 B
PHP
<?php
|
|
|
|
namespace Database\Component\Seeders;
|
|
|
|
use App\Component\Models\ClientsGroup;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class AddClientGroup extends Seeder {
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run() {
|
|
if (ClientsGroup::where('code', '0')->count() == 0) {
|
|
$group = new ClientsGroup([
|
|
'code' => '0',
|
|
'name' => 'Без группы',
|
|
]);
|
|
$group->save();
|
|
}
|
|
}
|
|
}
|