示例#1
0
 /**
  * Create a talk.
  *
  * @param Talk The talk to create.
  *
  * @return void
  */
 public static function createTalk(Talk $talk)
 {
     Log::info('Create talk.', compact('talk'));
     $validator = $talk->getValidator();
     if ($validator->fails()) {
         throw new ValidationException($validator);
     }
     $talk->created_by = Auth::user()->id;
     $talk->updated_by = Auth::user()->id;
     $talk->save();
 }