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);
|
|
|
|
}
|
|
|
|
|
2019-04-17 08:20:32 +02:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|