Add Prefix on URL
This commit is contained in:
@@ -14,10 +14,14 @@ class DashboardController extends Controller
|
||||
* Display a listing of the resource.
|
||||
* @return Renderable
|
||||
*/
|
||||
public function index(Request $request)
|
||||
public function index(Request $request, $corporate_id)
|
||||
{
|
||||
$user = Auth::user();
|
||||
$data = DashboardResources::make($user->managedCorporates()->where('active', 1)->with('currentPolicy', 'employees')->first());
|
||||
$currentCorporate = $user->managedCorporates()
|
||||
->with(['currentPolicy', 'employees'])
|
||||
->findOrFail($corporate_id);
|
||||
|
||||
$data = DashboardResources::make($currentCorporate);
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user