mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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 = [
|
$data = [
|
||||||
'client' => $client,
|
'client' => $client,
|
||||||
'method' => 'PUT',
|
'method' => 'PUT',
|
||||||
'url' => 'clients/'.$publicId,
|
'url' => 'clients/'.$client->public_id,
|
||||||
'title' => trans('texts.edit_client'),
|
'title' => trans('texts.edit_client'),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@ class BaseRequest extends Request {
|
|||||||
return $this->entity;
|
return $this->entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
//dd($this->clients);
|
$paramName = $this->entityType . 's';
|
||||||
$publicId = Input::get('public_id') ?: Input::get('id');
|
$publicId = $this->$paramName ?: (Input::get('public_id') ?: Input::get('id'));
|
||||||
|
|
||||||
if ( ! $publicId) {
|
if ( ! $publicId) {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user