Laravel 3 due Mon 19 Mar 11:00

In completing this assignment you will:
... to use logged-in user's id when saving a listing.


At the end of this assignment you should have a functional book application built on Laravel that provides the same functionality as at the end of homework #5. The focus of this assignment is on completing the Ajax functionality on the display page and getting the register page to work with your custom table.

Ajax and Display

From lab day you have a ``hello world'' Ajax program. You'll need to pass the database id to the server and then have the server load a view that provides the data to be placed on the page. The display of the listing details should be in a popup similar to the previous assignment.

Register Page

Laravel kindly created a register page for us, but we'll need to customize it as follows:
  1. Remove the name field from the register view.
  2. Remove the name field from the register controller.
  3. In the register controller change Users::create to Owner::create.
  4. In the register controller change use App\Users to use App\Owner.
  5. In the register controller change validation to look in owner rather that users when looking for duplicates.
  6. In the model register email and password as ``fillable'' and register password as ``hidden''.
  7. In the register controller change destination page to some meaningful.

My advice is to change one at a time and then observe the error message you get. Then you will be able to see a connection between the steps and the behavior of the application.

Final Touches on Sell Page

When a new listing is saved it should be tied to the currently logged-in user. Their id can be extracted from Auth::id(). That should be a fairly quick change to make.

Quick Links