- bump kwaadpepper/crud-policies - npm i vue-select moment --save-dev - Add Planning components - csrf_token to axios - Add Model WeekendPlanning - Add Enums CellModel, CellType, TableRow
29 lines
653 B
PHP
29 lines
653 B
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Enums\Role;
|
|
use App\Models\User;
|
|
use App\Models\WeekPlanning;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
class WeekPlanningSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Seed the application's database.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
WeekPlanning::truncate();
|
|
/** \App\Models\User $user */
|
|
foreach (User::where('role', Role::developper())->get() as $user) {
|
|
WeekPlanning::factory(13)->create([
|
|
'start' => Carbon::now()->startOfWeek(),
|
|
'user_id' => $user->id
|
|
]);
|
|
}
|
|
}
|
|
}
|