create and change code
This commit is contained in:
@@ -5,12 +5,12 @@ namespace App\Http\Controllers\V3\Dashboard\Harim;
|
||||
use App\Enums\HarimStates;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\V3\Dashboard\Harim\PanjareVahed\GetAccessRoadRequest;
|
||||
use App\Http\Requests\V3\Dashboard\Harim\PanjareVahed\GetRejectRequest;
|
||||
use App\Http\Requests\V3\Dashboard\Harim\PanjareVahed\ReceiveNewRequest;
|
||||
use App\Http\Traits\ApiResponse;
|
||||
use App\Models\City;
|
||||
use App\Models\Harim;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PanjareVahedController extends Controller
|
||||
{
|
||||
@@ -79,4 +79,18 @@ class PanjareVahedController extends Controller
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
||||
public function getRejectRequest(GetRejectRequest $request)
|
||||
{
|
||||
$state = HarimStates::MOKHALEFAT_BA_DASTGAH->value;
|
||||
|
||||
Harim::query()
|
||||
->firstWhere('panjare_vahed_id', '=', $request->panjare_vahed_id)
|
||||
->update([
|
||||
'state_id' => $state,
|
||||
'state_name' => HarimStates::name($state),
|
||||
]);
|
||||
|
||||
return $this->successResponse();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user