1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-06 03:02:34 +01:00
invoiceninja/app/Http/Requests/Invoice/EditInvoiceRequest.php

40 lines
659 B
PHP
Raw Normal View History

2019-04-15 02:10:54 +02:00
<?php
namespace App\Http\Requests\Invoice;
use App\Http\Requests\Request;
use App\Models\Invoice;
class EditInvoiceRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return auth()->user()->can('edit', $this->invoice);
}
public function rules()
{
$rules = [];
return $rules;
}
2019-04-15 02:10:54 +02:00
public function sanitize()
{
$input = $this->all();
//$input['id'] = $this->encodePrimaryKey($input['id']);
//$this->replace($input);
return $this->all();
}
}