0👍
You can return json response like this.
$roles = Role::whereNotIn('id', [1])->get();
return response()->json(['roles' => $roles]);
In after getting response, you can use response.roles to get all roles in vue js.
Source:stackexchange.com
0👍
You can return json response like this.
$roles = Role::whereNotIn('id', [1])->get();
return response()->json(['roles' => $roles]);
In after getting response, you can use response.roles to get all roles in vue js.