improve code in controller and form request for V3 whit pint package
This commit is contained in:
@@ -2,16 +2,13 @@
|
||||
|
||||
namespace App\Http\Requests\V3\RoadMaintenanceStation;
|
||||
|
||||
use App\Models\RahdariPoint;
|
||||
use Hekmatinasser\Verta\Facades\Verta;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class StoreRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
@@ -24,7 +21,7 @@ class StoreRequest extends FormRequest
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
* @return array<string, ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
@@ -33,7 +30,7 @@ class StoreRequest extends FormRequest
|
||||
'city_id' => 'required|exists:cities,id',
|
||||
'name' => 'required|string|max:255',
|
||||
'status' => 'required|in:0,1',
|
||||
'type' =>'required|in:1,2,3',
|
||||
'type' => 'required|in:1,2,3',
|
||||
'team_num' => 'numeric',
|
||||
'staff_num' => 'numeric',
|
||||
'phone' => 'string|max:50',
|
||||
|
||||
Reference in New Issue
Block a user