create controller and these dependensi
This commit is contained in:
@@ -20,7 +20,11 @@ class HarimOfficeController extends Controller
|
||||
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
$query = Harim::query()->where('edareh_shahri_id', '=', auth()->user()->edarate_shahri_id);
|
||||
$user = auth()->user();
|
||||
$query = Harim::query()
|
||||
->where('state_id','=',HarimStates::Baresi_Imeni_Rah_Tavasot_Daftar_Harim->value)
|
||||
->where('edare_shahri_id', '=', $user->edarate_shahri_id)
|
||||
->with('expert_description');
|
||||
$data = DataTableFacade::run(
|
||||
$query,
|
||||
$request,
|
||||
@@ -47,6 +51,7 @@ class HarimOfficeController extends Controller
|
||||
$harim ->update([
|
||||
'state_id' => $state,
|
||||
'state_name' => HarimStates::name($state),
|
||||
'final_description' => 'yes'
|
||||
]);
|
||||
});
|
||||
return $this->successResponse();
|
||||
@@ -69,6 +74,7 @@ class HarimOfficeController extends Controller
|
||||
$harim ->update([
|
||||
'state_id' => $state,
|
||||
'state_name' => HarimStates::name($state),
|
||||
'final_description' => 'no'
|
||||
]);
|
||||
});
|
||||
return $this->successResponse();
|
||||
|
||||
Reference in New Issue
Block a user