HW07: Laravel Intro due Tue 05 Mar 13:20

\begin{purpose}
In completing this assignment you will:
\begin{itemize}
\ite...
...y highlight the current
page of the application.
\end{itemize}
\end{purpose}

Allowed and Disallowed Resources

In completing this assignment you MAY use/access the following resources:

You may NOT use/access:

Failure to abide by these guidelines will result in a zero for the assignment and the incident will be reported to the university provost as a violation of the university academic integrity policy. A second incident of academic dishonesty (whether from this course or another computer science course) will result in an F in the course.

Details

You should complete each of these steps:
  1. If needed, install composer/laravel locally and update your .bashrc file to include the laravel bin directory in your path. NOTE: This should have been done as part of the prelab assignment.

  2. Use the laravel new command to create your hw07 directory. NOTE: Do not have a separate project directory inside of hw07.

  3. Apply all of the permissions changes needed to be able to run the framework without issue.

  4. Create a controller called BookController and define stub actions for index, addbook, bookdetail, error, and deletebook. (We'll deal with login, logout, and signup in a different controller in a later assignment).

  5. In the views directory, create a subdirectory called layouts. In the layouts directory create a template called main.blade.php which contains the header, menu, and footer that is common to each page of your application. Leave placeholders for the page title (in head) and the main content of the page.

  6. Copy your css and js directories from your previous project into the public directory. Then modify the main layout to pull those in (using the asset() function). Also, make sure that local hyperlinks from the menu are working.

  7. Create a view for your index page that utilizes your main layout and displays some content. For this assignment we won't be accessing the database so you can remove or comment out commands that interact with the database. Instead put a couple of placeholder entries so you can get.

  8. Establish a route for the index page that points to the index method in your controller. Have the index method of the controller load the index view.

  9. Now establish similar route/controller/view behaviors for: addbook, bookdetail, and error. For error, have the controller extract the error code from the query string and pass it on to the error page. That is, the error page should be completely working. For the others pages just display placeholder data for now.

  10. Take time to clean up the project by removing the default controllers, views, and routes.

Summary

By the end of this assignment you should have a reasonably formatted application in the hw07 directory of your web space that runs under Laravel and provides this behavior: