Example #1
0
 /**
  * Responds to requests to GET /books/create
  */
 public function getCreate()
 {
     $authorModel = new \App\Author();
     $authors_for_dropdown = $authorModel->getAuthorsForDropdown();
     # Get all the possible tags so we can include them with checkboxes in the view
     $tagModel = new \App\Tag();
     $tags_for_checkbox = $tagModel->getTagsForCheckboxes();
     return view('books.create')->with('authors_for_dropdown', $authors_for_dropdown)->with('tags_for_checkbox', $tags_for_checkbox);
 }
Example #2
0
 /**
  * Responds to requests to GET /books/create
  */
 public function getCreate()
 {
     //return 'Form to create a new book';
     $authorModel = new \App\Author();
     $authors_for_dropdown = $authorModel->getAuthorsForDropdown();
     return view('books.create')->with('authors_for_dropdown', $authors_for_dropdown);
 }