mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 22:22:32 +01:00
Working on custom route model binding
This commit is contained in:
parent
7aded4588b
commit
1a47598aea
@ -184,7 +184,7 @@ class ClientController extends BaseController
|
||||
$data = [
|
||||
'client' => $client,
|
||||
'method' => 'PUT',
|
||||
'url' => 'clients/'.$publicId,
|
||||
'url' => 'clients/'.$client->public_id,
|
||||
'title' => trans('texts.edit_client'),
|
||||
];
|
||||
|
||||
|
@ -15,8 +15,8 @@ class BaseRequest extends Request {
|
||||
return $this->entity;
|
||||
}
|
||||
|
||||
//dd($this->clients);
|
||||
$publicId = Input::get('public_id') ?: Input::get('id');
|
||||
$paramName = $this->entityType . 's';
|
||||
$publicId = $this->$paramName ?: (Input::get('public_id') ?: Input::get('id'));
|
||||
|
||||
if ( ! $publicId) {
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user