Exemplo n.º 1
0
 public function destroy($id)
 {
     if ($id != \Config::get('auth.root.user')) {
         User::destroy($id);
         return true;
     }
     return false;
 }
Exemplo n.º 2
0
 public function destroy($id)
 {
     $users = User::select('id')->where('role_id', '=', $id)->take(1)->get()->toArray();
     if (!$users) {
         Role::destroy($id);
         return true;
     }
     return false;
 }
Exemplo n.º 3
0
 public function run()
 {
     User::create(["id" => 4, "first_name" => "Root", "last_name" => "Sistema", "email" => "*****@*****.**", "password" => 'NatArg2016', "enabled" => 1, "role_id" => 1, "user_created_id" => 4]);
 }