app/Http/Controllers/CosteoController.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)
    {
        if($request){
            $query = trim($request->get('busqueda'));
            $costeo = Costeo::where('producto','LIKE','%'.$query.'%')
            ->orWhere('codigoLote')
            ->orderBy('id','producto')
            ->paginate(7);
          return view('costeo.lista',["costeo"=>$costeo]);
        }
    }
public function index ( Request $ request ) { if ( $ request ) { $ query = trim ( $ request -> get ( 'busqueda' ) ) ; $ costeo = Costeo :: where ( 'producto' , 'LIKE' , '%' . $ query . '%' ) -> orWhere ( 'codigoLote' ) -> orderBy ( 'id' , 'producto' ) -> paginate ( 7 ) ; return view ( 'costeo.lista' , [ " costeo " => $ costeo ] ) ; } }
Display a listing of the resource.
Display a listing of the resource .