I'm new to Laravel 5
.
I am trying to bind my routes
with models
.
In My RouteServiceProvider.php
public function boot(Router $router)
{
parent::boot($router);
$router->model('messages','App\messages');
}
My Controller is : Message_cont
My Function is :
public function show(Message_cont $id) {
dd($id);
}
My Output is :
message_cont {#199 ▼
#middleware: []
#validatesRequestErrorBag: null
}
What is wrong with my code...?