Ejemplo n.º 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     date_default_timezone_set('EST');
     $data = ['citizenship' => $request->input('citizenship'), 'destination' => $request->input('destination'), 'date_of_birth' => $request->input('date_of_birth'), 'start_travel' => $request->input('start_travel'), 'end_travel' => $request->input('end_travel'), 'status_id' => $request->input('status_id'), 'dependent' => $request->input('dependent'), 'state' => $request->input('state'), 'created_at' => date('Y-m-d H:i:s')];
     $search = Search::create($data);
 }
Ejemplo n.º 2
0
 /**
  * Handle the event.
  *
  * @param  VoidSearch  $event
  * @return void
  */
 public function handle(VoidSearch $event)
 {
     //
     Search::create(['user_id' => $event->user->id, 'keyword' => $event->keyword]);
 }