I have a controller which has an optional id as input parameter. The id represents a primary key of a book in a table called tbl_book.
In my view file I have a search form where a user can search for one or more books. The user can as default enter the page without a given book id in the URL, thus the report view is rendered without any model loaded.
Since there is no model loaded then, I am not able to use the following in my view file.
What should I replace these three lines in the view file with, when there is no model loaded? Can you please point me in the right direction?