app/Http/Controllers/CustomerController.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)
    {
      $name = $request->get('buscarpor');
      $customers = Customer::where('name','like',"%$name%")->latest()->paginate(25);
      $parameters = Parameter ::all();
      return view('customers.index',compact('customers','parameters'));
    }
public function index ( Request $ request ) { $ name = $ request -> get ( 'buscarpor' ) ; $ customers = Customer :: where ( 'name' , 'like' , " % $ name % " ) -> latest ( ) -> paginate ( 25 ) ; $ parameters = Parameter :: all ( ) ; return view ( 'customers.index' , compact ( 'customers' , 'parameters' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .