app/Api/V1/Controllers/ResponseController.php
/**
     * Display a listing of the resource
     *
     * @param Request $request
     * @return Response
     */
Display a listing of the resource
@param Request $request
@return Response
Display a listing of the resource @param Request $request @return Response
public function index(Request $request) {
        $search = null;
        if ($request->input('search') != null) {
            $search = $request->input('search');
        }
        $response = Response::query();
        if (!is_null($search)) {
            $response = $response->with('feedback.creator')->with('responder')->where(function ($query) use ($search) {
                $query->where('content', 'like', '%' . $search . '%');
            });
        }
        $response->withDates();
        return $response->get();
    }
public function index ( Request $ request ) { $ search = null ; if ( $ request -> input ( 'search' ) != null ) { $ search = $ request -> input ( 'search' ) ; } $ response = Response :: query ( ) ; if ( ! is_null ( $ search ) ) { $ response = $ response -> with ( 'feedback.creator' ) -> with ( 'responder' ) -> where ( function ( $ query ) use ( $ search ) { $ query -> where ( 'content' , 'like' , '%' . $ search . '%' ) ; } ) ; } $ response -> withDates ( ) ; return $ response -> get ( ) ; }
Display a listing of the resource
 @param Request $request
 @return Response
Display a listing of the resource @param Request $request @return Response
//date range