improve code in controller and form request for V3 whit pint package
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Requests\V3\LogList;
|
||||
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreRequest extends FormRequest
|
||||
@@ -17,14 +18,14 @@ 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
|
||||
{
|
||||
return [
|
||||
'description' =>'required|string',
|
||||
'log_unique_code' =>'required|numeric|unique:log_lists,log_unique_code',
|
||||
'action_type' =>'required|string',
|
||||
'description' => 'required|string',
|
||||
'log_unique_code' => 'required|numeric|unique:log_lists,log_unique_code',
|
||||
'action_type' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user