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

27 lines
485 B
PHP
Raw Normal View History

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