示例#1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $publishingCompanies = ['' => 'Select...'] + PublishingCompanies::lists('name', 'id')->toArray();
     $genus = Gender::lists('label', 'id');
     $book = Book::find($id);
     return \View::make('books.form')->with('datas', ['publishingCompanies' => $publishingCompanies, 'genus' => $genus])->with('book', $book);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     PublishingCompanies::create(['name' => 'Novatec']);
     PublishingCompanies::create(['name' => 'Abril']);
     PublishingCompanies::create(['name' => 'Ciência Moderna']);
     PublishingCompanies::create(['name' => 'Makron Books']);
     PublishingCompanies::create(['name' => 'O\'REILLY']);
     PublishingCompanies::create(['name' => 'Thomson']);
     PublishingCompanies::create(['name' => 'Editora Ática']);
 }