app/Http/Controllers/AsistenteController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index(Request $request)
    {
        $q = $request->input('search');
        $id_evento = $request->input('id_evento');
        $user = Asistente::leftJoin('asiste_evento', 'asistentes.id', '=', 'asiste_evento.id_asistente')->where( 'nombre', 'LIKE', '%' . $q . '%' )->where( 'asiste_evento.id_evento', '=', $id_evento )->orderBy('asistentes.id', 'desc')->paginate (10)->setPath ( '' );
            $pagination = $user->appends ( array (
                'search' => $request->input('search')
                ) );
        return $user;
    }
public function index ( Request $ request ) { $ q = $ request -> input ( 'search' ) ; $ id_evento = $ request -> input ( 'id_evento' ) ; $ user = Asistente :: leftJoin ( 'asiste_evento' , 'asistentes.id' , '=' , 'asiste_evento.id_asistente' ) -> where ( 'nombre' , 'LIKE' , '%' . $ q . '%' ) -> where ( 'asiste_evento.id_evento' , '=' , $ id_evento ) -> orderBy ( 'asistentes.id' , 'desc' ) -> paginate ( 10 ) -> setPath ( '' ) ; $ pagination = $ user -> appends ( array ( 'search' => $ request -> input ( 'search' ) ) ) ; return $ user ; }
Display a listing of the resource.
Display a listing of the resource .