restore composer.json, add mysqli extension
This commit is contained in:
47
app/Http/Requests/Dashboard/Partner/Store.php
Executable file
47
app/Http/Requests/Dashboard/Partner/Store.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Dashboard\Partner;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class Store extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name_uz' => 'required|string',
|
||||
'name_ru' => 'required|string',
|
||||
'image' => 'required|image',
|
||||
'status' => 'required|in:published,new,soon',
|
||||
'video_url' => 'nullable|url',
|
||||
'description_uz' => 'required|string',
|
||||
'description_ru' => 'required|string',
|
||||
'position' => 'required|integer',
|
||||
'is_price' => 'nullable|boolean',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getName(): array
|
||||
{
|
||||
return [
|
||||
'uz' => $this->get('name_uz'),
|
||||
'ru' => $this->get('name_ru')
|
||||
];
|
||||
}
|
||||
|
||||
public function getDescription(): array|null
|
||||
{
|
||||
return [
|
||||
'uz' => $this->get('description_uz'),
|
||||
'ru' => $this->get('description_ru')
|
||||
];
|
||||
}
|
||||
}
|
||||
47
app/Http/Requests/Dashboard/Partner/Update.php
Executable file
47
app/Http/Requests/Dashboard/Partner/Update.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Dashboard\Partner;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class Update extends FormRequest
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name_uz' => 'required|string',
|
||||
'name_ru' => 'required|string',
|
||||
'image' => 'nullable|image',
|
||||
'status' => 'required|in:published,new,soon',
|
||||
'video_url' => 'nullable|url',
|
||||
'description_uz' => 'required|string',
|
||||
'description_ru' => 'required|string',
|
||||
'position' => 'required|integer',
|
||||
'with_price' => 'nullable|boolean',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getName(): array
|
||||
{
|
||||
return [
|
||||
'uz' => $this->get('name_uz'),
|
||||
'ru' => $this->get('name_ru')
|
||||
];
|
||||
}
|
||||
|
||||
public function getDescription(): array|null
|
||||
{
|
||||
return [
|
||||
'uz' => $this->get('description_uz'),
|
||||
'ru' => $this->get('description_ru')
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user