mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
Merge branch 'master' of https://github.com/bytefury/crater
This commit is contained in:
37
app/Http/Requests/UnzipUpdateRequest.php
Normal file
37
app/Http/Requests/UnzipUpdateRequest.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Crater\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UnzipUpdateRequest 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 [
|
||||
'path' => [
|
||||
'required',
|
||||
'regex:/^[\.\/\w\-]+$/'
|
||||
],
|
||||
'module' => [
|
||||
'required',
|
||||
'string'
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -25,7 +25,7 @@ class UploadExpenseReceiptRequest extends FormRequest
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'upload_receipt' => [
|
||||
'attachment_receipt' => [
|
||||
'nullable',
|
||||
new Base64Mime(['gif', 'jpg', 'png'])
|
||||
]
|
||||
|
||||
40
app/Http/Requests/UploadModuleRequest.php
Normal file
40
app/Http/Requests/UploadModuleRequest.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Crater\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UploadModuleRequest 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 [
|
||||
'avatar' => [
|
||||
'required',
|
||||
'file',
|
||||
'mimes:zip',
|
||||
'max:20000'
|
||||
],
|
||||
'module' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:100'
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user