/**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     //
     DB::table('admins')->delete();
     $admins = [['adminid' => 123456, 'adminlname' => 'Badar', 'adminfname' => 'Jonadene', 'adminmname' => 'Alde', 'adminemail' => '*****@*****.**', 'adminpass' => '40bd001563085fc35165329ea1ff5c5ecbdbbeef', 'adminaddress' => 'Cebu City', 'admingender' => 'Female', 'adminnumber' => '09469147354']];
     Admin::insert($admins);
 }
Example #2
0
 /**
  * Updates the admin column of the user table to 1 for a given user.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function promote($id)
 {
     Admin::insert(['userid' => $id]);
     return redirect('admin/manage');
 }