request->add(['customer_id'=>auth('customer')->id()]); $model = PriceTrigger::class; $this->with = ['customer']; $this->select = ['*']; $this->search = ['*']; parent::__construct($model, $this->with, $this->select); } /** * Display a listing of the resource. * * @return \Illuminate\Http\JsonResponse */ public function index() { $data=PriceTrigger::where("customer_id",auth()->id())->get(); return response()->json($data); } }