コード例 #1
0
ファイル: BookController.php プロジェクト: sietekk/foobooks
 /**
  * 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);
 }
コード例 #2
0
ファイル: BookController.php プロジェクト: rhsu0268/foobooks
 /**
  * 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);
 }