app/Http/Controllers/TenantController.php
/**
     * @param Tenant $tenant
     * @return JsonResponse|View
     * @throws AuthorizationException
     */
@param Tenant $tenant
@return JsonResponse|View
@throws AuthorizationException
@param Tenant $tenant @return JsonResponse|View @throws AuthorizationException
public function show(Tenant $tenant)
    {
        $this->authorize('view', $tenant);
        if (request()->ajax()) {
            return Response::json([
                'tenant' => $tenant,
            ]);
        }
        return view('tenant.show');
    }
public function show ( Tenant $ tenant ) { $ this -> authorize ( 'view' , $ tenant ) ; if ( request ( ) -> ajax ( ) ) { return Response :: json ( [ 'tenant' => $ tenant , ] ) ; } return view ( 'tenant.show' ) ; }
@param Tenant $tenant
 @return JsonResponse|View
 @throws AuthorizationException
@param Tenant $tenant @return JsonResponse|View @throws AuthorizationException