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