This commit is contained in:
gholak tala
2026-01-24 14:03:11 +00:00
parent 7dcd83715a
commit eb26afbcb3
224 changed files with 32652 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?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);
}
}