I am learning laravel and i want to try show a single book through a wildcard but it shows an error
<p>here is my route</p>

<pre><code>Route::get('showbooks', 'AdminController@show');
Route::get('showbooks/{book_id}', 'AdminController@singleBook');
</code></pre>

<p>here is methods for all and single book</p>

<pre><code>public function show()
    {
        $allBooks = Book::all();
        return view ('admin.showbooks', compact('allBooks'));
    }

    public function singleBook($book_id)
    {
        $book = Book::find($book_id);
        return view ('admin.singlebook', compact('book'));
    }
</code></pre>

<p>here is link for single book</p>

<pre><code>@foreach($allBooks as $book)
                            &lt;h2&gt;&lt;a href="{{ url('showbooks', $book-&gt;book_id) }}"&gt; Book Id is: {{ $book-&gt;book_id }}&lt;/a&gt;&lt;/h2&gt;

                            &lt;h4&gt;Book Title is: {{ $book-&gt;title }}&lt;/h4&gt;
                        @endforeach
</code></pre>

<p>this is my single book view</p>

<pre><code>&lt;div class="col-lg-9"&gt;
                    &lt;h1&gt;{{ $book-&gt;book_id }}&lt;/h1&gt;
                    &lt;h3&gt;{{ $book-&gt;tile }}&lt;/h3&gt;
                &lt;/div&gt;
</code></pre>