I registered this resource:
Route::resource('order-item-paxes', 'OrderItemPaxController', ['except' => ['show', 'create', 'store']]);
The problem is that I cannot get the model in the controller doing this:
public function edit(OrderItemPax $order_item_pax)
{
$order_item_pax = OrderItemPax::find($id);
return view('production.order-item-paxes.edit', compact('order_item_pax'));
}
$order_item_pax->toArray() returns an empty Array.
I checked the routes through php artisan route:list and its returning something strange:
PUT|PATCH | production/order-item-paxes/{order_item_paxis}
It should be order_item_pax instead of order_item_paxis.
Any idea?
UPDATE
If I use $order_item_paxis in my controller it works. I've registered hundreds of Resources and I've always used the singular version of the name
['names' => ['update' => 'order-item-paxes']]);- Farkie