separate operator from supervisor in road item
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\RoadItemsProject;
|
||||
namespace App\Http\Requests\V3\RoadItem;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Validator;
|
||||
30
app/Http/Requests/V3/RoadItem/Supervisor/ConfirmRequest.php
Normal file
30
app/Http/Requests/V3/RoadItem/Supervisor/ConfirmRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\RoadItem\Supervisor;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
|
||||
class ConfirmRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return Gate::allows('gate-supervise-road-item', $this->roadItemsProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'description' => 'string',
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/V3/RoadItem/Supervisor/RejectRequest.php
Normal file
30
app/Http/Requests/V3/RoadItem/Supervisor/RejectRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\RoadItem\Supervisor;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
|
||||
class RejectRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return Gate::allows('gate-supervise-road-item', $this->roadItemsProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'description' => 'string',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\RoadItemsProject;
|
||||
namespace App\Http\Requests\V3\RoadItem;
|
||||
|
||||
use App\Models\InfoItem;
|
||||
use App\Models\User;
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V3\RoadItemsProject;
|
||||
namespace App\Http\Requests\V3\RoadItem;
|
||||
|
||||
use App\Models\InfoItem;
|
||||
use App\Models\User;
|
||||
Reference in New Issue
Block a user