public function destroy($id) { if ($id != \Config::get('auth.root.user')) { User::destroy($id); return true; } return false; }
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; }
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]); }