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