invoiceninja/app/Http/Requests/Template/ShowTemplateRequest.php
David Bomba 2ed7c557b0
Fixes (#3549)
* Fixes for designs

* minor fixes
2020-03-26 19:25:44 +11:00

52 lines
963 B
PHP

<?php
/**
* Invoice Ninja (https://invoiceninja.com)
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://opensource.org/licenses/AAL
*/
namespace App\Http\Requests\Template;
use App\Http\Requests\Request;
class ShowTemplateRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize() : bool
{
return auth()->user()->isAdmin();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
"template" => "sometimes",
];
}
protected function prepareForValidation()
{
$input = $this->all();
$this->replace($input);
}
public function message()
{
}
}