first commit

This commit is contained in:
2023-05-17 09:57:20 +03:00
commit fda632f9a7
1701 changed files with 364808 additions and 0 deletions

View File

@ -0,0 +1,39 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class PostStoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules()
{
return [
'translations'=>'required|array',
'translations.*.title'=>'required|unique:post_translations',
];
}
public function messages()
{
return [
'translations.*.title.required'=>'Поле обязательно для заполнения',
'translations.*.title.unique'=>'Заголовок должен быть уникальным',
];
}
}

View File

@ -0,0 +1,30 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class SliderRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules()
{
return [
'image' => 'required|image|mimes:png,jpg,jpeg|max:10000',
];
}
}