/
home
/
pay
/
server_old
/
app
/
Http
/
Controllers
/
Customer
/
File Upload :
llllll
Current File: /home/pay/server_old/app/Http/Controllers/Customer/PriceTriggerController.php
<?php namespace App\Http\Controllers\Customer; use App\Http\Controllers\SuperController; use Illuminate\Http\Request; use App\Models\PriceTrigger; // اطمینان حاصل کنید که این مدل به درستی وارد شده است class PriceTriggerController extends SuperController { public function __construct(Request $request) { $request->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); } }
Copyright ©2k19 -
Hexid
|
Tex7ure