- Added standard Laravel directory structure and configuration. - Included Svelte and Tailwind configuration for the admin interface. - Added core PHPUnit and testing scripts.
34 lines
739 B
PHP
34 lines
739 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Admin\Backups;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
/**
|
|
* Request for uploading a backup file.
|
|
*/
|
|
class UploadBackupRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return $this->user()->hasPermission('manage-backups');
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'backup_file' => 'required|file|max:51200', // Max 50MB
|
|
];
|
|
}
|
|
}
|