I am developing a web application by Laravel5, and in code of Controller, I wrote a code bellow.
public function show($id)
{
$post = Post::find($id);
boot
method is inherited from Illuminate\Foundation\Support\Providers\RouteServiceProvider
which doesn't have the same signature as yours which is causing this error.
If you have to use the router inside boot
method then use app()
helper function to get the instance of the router.
public function boot()
{
$router = app('router'); // Router Instance
parent::boot();
}