invoiceninja/app/Http/Requests/CreateDocumentRequest.php

38 lines
668 B
PHP
Raw Normal View History

2017-01-30 21:40:43 +02:00
<?php
namespace App\Http\Requests;
2016-05-01 22:30:39 +03:00
use App\Models\Expense;
2017-01-30 21:40:43 +02:00
use App\Models\Invoice;
2016-05-01 22:30:39 +03:00
class CreateDocumentRequest extends DocumentRequest
{
protected $autoload = [
ENTITY_INVOICE,
ENTITY_EXPENSE,
];
2016-05-01 22:30:39 +03:00
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
if($this->user()->hasFeature(FEATURE_DOCUMENTS))
return true;
2016-05-01 22:30:39 +03:00
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
//'file' => 'mimes:jpg'
2016-05-01 22:30:39 +03:00
];
}
}