Exemple #1
0
 public function postAdd(Request $request)
 {
     $user = \vAMSYS\User::where('email', $request->input('email'))->first();
     $pilot = new Pilot();
     $pilot->username = $request->input('callsign');
     $pilot->rank_id = 1;
     $pilot->user_id = $user->id;
     $pilot->airline_id = Session::get('airlineId');
     $pilot->location_id = 16515;
     $pilot->save();
     return view('staff.pilots.dashboard');
 }
Exemple #2
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 public function create(array $data)
 {
     return User::create(['first_name' => $data['first_name'], 'last_name' => $data['last_name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }