<?php
namespace App\Http\Requests\Admin;
use Gate;
use Illuminate\Foundation\Http\FormRequest;
class StoreSiteSettingRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return Gate::allows('site_setting_create');
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules()
{
return [
'key' => [
'required',
'unique:site_settings,key',
],
'value' => [
'required',
],
];
}
}