invoiceninja/app/Http/Requests/ClientRequest.php

27 lines
485 B
PHP
Raw Normal View History

2016-04-28 15:16:33 +03:00
<?php namespace App\Http\Requests;
class ClientRequest extends BaseRequest {
protected $entityType = ENTITY_CLIENT;
2016-04-28 15:23:09 +03:00
public function entity()
{
return parent::entity()->load('contacts');
}
2016-04-28 15:16:33 +03:00
public function authorize()
{
2016-04-30 21:55:15 +03:00
return $this->user()->can('view', $this->entity());
2016-04-28 15:16:33 +03:00
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [];
}
}