initial commit

This commit is contained in:
2026-06-23 13:28:38 +07:00
commit 966ed115b2
590 changed files with 111412 additions and 0 deletions
+82
View File
@@ -0,0 +1,82 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class BaseFormRequest 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
*/
public function rules()
{
return match($this->method()){
'POST' => $this->store(),
'PUT', 'PATCH' => $this->update(),
'DELETE' => $this->destroy(),
default => $this->index()
};
}
/**
* Get the validation rules that apply to the get request.
*
* @return array
*/
public function index()
{
return [
//
];
}
/**
* Get the validation rules that apply to the post request.
*
* @return array
*/
public function store()
{
return [
//
];
}
/**
* Get the validation rules that apply to the put/patch request.
*
* @return array
*/
public function update()
{
return [
//
];
}
/**
* Get the validation rules that apply to the delete request.
*
* @return array
*/
public function destroy()
{
return [
//
];
}
}