src folder refactoring

This commit is contained in:
Peter Papp
2021-07-18 14:43:50 +02:00
parent fc952d089b
commit 5046071f3a
134 changed files with 11976 additions and 42 deletions
@@ -0,0 +1,19 @@
<?php
namespace App\Http\Requests\Share;
use Illuminate\Foundation\Http\FormRequest;
class AuthenticateShareRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'password' => 'required|string',
];
}
}
@@ -0,0 +1,35 @@
<?php
namespace App\Http\Requests\Share;
use Illuminate\Support\Facades\Auth;
use Illuminate\Foundation\Http\FormRequest;
class CreateShareRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return Auth::check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'isPassword' => 'required|boolean',
'type' => 'required|string',
'expiration' => 'integer|nullable',
'permission' => 'string',
'password' => 'string',
'emails.*' => 'email',
];
}
}
@@ -0,0 +1,33 @@
<?php
namespace App\Http\Requests\Share;
use Illuminate\Support\Facades\Auth;
use Illuminate\Foundation\Http\FormRequest;
class UpdateShareRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return Auth::check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'protected' => 'required|boolean',
'permission' => 'nullable|string',
'expiration' => 'integer|nullable',
'password' => 'string',
];
}
}