37 lines
1.0 KiB
PHP
37 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Admin\System;
|
|
|
|
use Illuminate\Contracts\Validation\ValidationRule;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class GeneralSettingRequest 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, ValidationRule|array<mixed>|string>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'site_name' => ['required', 'string', 'max:50'],
|
|
'site_description' => ['required', 'string'],
|
|
'site_address' => ['required', 'string'],
|
|
'site_phone' => ['required', 'string', 'max:20'],
|
|
'logo_light' => ['nullable', 'image', 'max:2048'],
|
|
'logo_dark' => ['nullable', 'image', 'max:2048'],
|
|
'icon_light' => ['nullable', 'image', 'max:1024'],
|
|
'icon_dark' => ['nullable', 'image', 'max:1024'],
|
|
];
|
|
}
|
|
}
|