Ejemplo n.º 1
0
 public static function createHoliday($data)
 {
     $organization = Organization::getUserOrganization();
     $holiday = new Holiday();
     $holiday->name = array_get($data, 'name');
     $holiday->date = array_get($data, 'date');
     $holiday->organization()->associate($organization);
     $holiday->save();
 }