Code Cleanup

pull/3/head
Hasin Hayder 3 years ago
parent fd3c5d2245
commit e57f7f1945

@ -14,7 +14,7 @@ class HydraController extends Controller
public function version(){
return response([
"message"=>"1.0.0"
"version"=>"1.0.0"
]);
}
}

@ -15,15 +15,6 @@ class RoleController extends Controller {
return Role::all();
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create() {
//
}
/**
* Store a newly created resource in storage.
*
@ -59,16 +50,6 @@ class RoleController extends Controller {
return $role;
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Models\Role $role
* @return \Illuminate\Http\Response
*/
public function edit(Role $role) {
//
}
/**
* Update the specified resource in storage.
*

@ -21,15 +21,6 @@ class UserController extends Controller {
return User::all();
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create() {
//
}
/**
* Store a newly created resource in storage.
*
@ -106,16 +97,6 @@ class UserController extends Controller {
return $user;
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Models\User $user
* @return \Illuminate\Http\Response
*/
public function edit(User $user) {
//
}
/**
* Update the specified resource in storage.
*

@ -17,16 +17,6 @@ class UserRoleController extends Controller {
return $user->load('roles');
}
/**
* Show the form for creating a new resource.
*
* @param \App\Models\User $user
* @return \Illuminate\Http\Response
*/
public function create(User $user) {
//
}
/**
* Store a newly created resource in storage.
*
@ -44,41 +34,7 @@ class UserRoleController extends Controller {
return $user->load('roles');
} else {
return $user->load('roles');
// return response(['error' => 1, 'message' => 'user already has this role'], 409);
}
}
/**
* Display the specified resource.
*
* @param \App\Models\User $user
* @param \App\Models\Role $role
* @return \Illuminate\Http\Response
*/
public function show(User $user, Role $role) {
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Models\User $user
* @param \App\Models\Role $role
* @return \Illuminate\Http\Response
*/
public function edit(User $user, Role $role) {
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Models\User $user
* @param \App\Models\Role $role
* @return \Illuminate\Http\Response
*/
public function update(Request $request, User $user, Role $role) {
//
}
/**
@ -89,9 +45,7 @@ class UserRoleController extends Controller {
* @return \Illuminate\Http\Response
*/
public function destroy(User $user, Role $role) {
//this relationship exists
$user->roles()->detach($role);
return $user->load('roles');
// return response(['error' => 0, 'message' => 'role has been removed from this user'], 409);
}
}

Loading…
Cancel
Save