app/Http/Controllers/EnterpriseThanksAdminController.php
/**
     *
     * Select enterprise names to fill autocomplete field
     * 
     * @param Request
     *
     * @return Response
     * 
     */
Select enterprise names to fill autocomplete field

@param Request

@return Response
Select enterprise names to fill autocomplete field @param Request @return Response
public function autocomplete(Request $request)
    {
        $data = Enterprise::select('name')->where('name',"LIKE","%{$request->input('query')}%")->get();
        return response()->json($data);
    }
public function autocomplete ( Request $ request ) { $ data = Enterprise :: select ( 'name' ) -> where ( 'name' , " LIKE " , " % { $ request -> input ( 'query' ) } % " ) -> get ( ) ; return response ( ) -> json ( $ data ) ; }
Select enterprise names to fill autocomplete field
Select enterprise names to fill autocomplete field