1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/app/Http/Requests/Document/DownloadMultipleDocumentsRequest.php

31 lines
580 B
PHP
Raw Normal View History

2020-08-20 03:10:04 +02:00
<?php
namespace App\Http\Requests\Document;
use Illuminate\Foundation\Http\FormRequest;
class DownloadMultipleDocumentsRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
2020-08-20 03:11:54 +02:00
return auth()->user()->can('view', $this->document);
2020-08-20 03:10:04 +02:00
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'file_hash' => ['required'],
];
}
}