Modified view.blade template to display books in html or json format.