2016-05-01 21:30:39 +02:00
|
|
|
<?php namespace App\Http\Requests;
|
|
|
|
|
|
|
|
class CreateDocumentRequest extends DocumentRequest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function authorize()
|
|
|
|
{
|
2016-05-30 12:44:49 +02:00
|
|
|
return $this->user()->can('create', ENTITY_DOCUMENT) && $this->user()->hasFeature(FEATURE_DOCUMENTS);
|
2016-05-01 21:30:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the validation rules that apply to the request.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function rules()
|
|
|
|
{
|
|
|
|
return [
|
2016-05-30 12:44:49 +02:00
|
|
|
//'file' => 'mimes:jpg'
|
2016-05-01 21:30:39 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|