invoiceninja/app/Http/Requests/CreateTaskRequest.php

31 lines
527 B
PHP
Raw Normal View History

2017-01-30 21:40:43 +02:00
<?php
namespace App\Http\Requests;
2016-05-01 15:04:55 +03:00
2019-01-30 22:00:26 +11:00
use App\Models\Task;
2016-05-01 15:04:55 +03:00
class CreateTaskRequest extends TaskRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
2019-01-30 22:00:26 +11:00
return $this->user()->can('create', Task::class);
2016-05-01 15:04:55 +03:00
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'time_log' => 'time_log',
];
}
}