2018-11-02 11:54:46 +01:00
|
|
|
<?php
|
2019-05-11 05:32:07 +02:00
|
|
|
/**
|
2020-09-06 11:38:10 +02:00
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
2019-05-11 05:32:07 +02:00
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
2020-01-07 01:13:47 +01:00
|
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
2019-05-11 05:32:07 +02:00
|
|
|
*
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
*/
|
2018-11-02 11:54:46 +01:00
|
|
|
|
|
|
|
namespace App\Http\Requests\Client;
|
|
|
|
|
|
|
|
use App\Http\Requests\Request;
|
2019-01-21 15:06:49 +01:00
|
|
|
use App\Models\Client;
|
2018-11-02 11:54:46 +01:00
|
|
|
|
2018-11-03 02:01:40 +01:00
|
|
|
class EditClientRequest extends Request
|
2018-11-02 11:54:46 +01:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
2019-04-16 05:28:05 +02:00
|
|
|
public function authorize() : bool
|
2018-11-02 11:54:46 +01:00
|
|
|
{
|
2019-03-27 22:32:50 +01:00
|
|
|
return auth()->user()->can('edit', $this->client);
|
2018-11-02 11:54:46 +01:00
|
|
|
}
|
|
|
|
|
2019-12-20 12:23:09 +01:00
|
|
|
// public function prepareForValidation()
|
|
|
|
// {
|
|
|
|
// $input = $this->all();
|
2018-11-10 14:24:36 +01:00
|
|
|
|
2019-12-20 12:23:09 +01:00
|
|
|
// //$input['id'] = $this->encodePrimaryKey($input['id']);
|
2018-11-10 14:24:36 +01:00
|
|
|
|
2019-12-20 12:23:09 +01:00
|
|
|
// $this->replace($input);
|
2018-11-10 14:24:36 +01:00
|
|
|
|
2019-12-20 12:23:09 +01:00
|
|
|
// }
|
2019-12-30 22:59:12 +01:00
|
|
|
}
|