mirror of
https://github.com/Cybrarist/Discount-Bandit.git
synced 2026-11-24 19:49:54 +01:00
add global search hotkey add community stores where users can import/export stores from new repository fix media markt 404 on crawling add currency resource, so users can modify the rate without the need for API add new '*' in case there are multiple fields in schema add basic code for plugin support to test it in production, shouldn't affect anything add warning message if ntfy is added without topic
36 lines
917 B
PHP
36 lines
917 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use App\Enums\ProductStatusEnum;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class StoreProductRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => ['nullable', 'string'],
|
|
'status' => ['required', Rule::enum(ProductStatusEnum::class)],
|
|
'is_favourite' => ['required', 'boolean'],
|
|
'snoozed_until' => ['nullable', 'date'],
|
|
'remove_link_if_out_of_stock_for_x_days' => ['nullable', 'integer'],
|
|
|
|
];
|
|
}
|
|
}
|