Example #1
0
 /**
  * @param $bikeId
  * @return View|string
  */
 public function showAd($bikeId)
 {
     try {
         $bike = Bicycle::findOrFail($bikeId);
         return View('ad.adMaster', ['bike' => $bike]);
     } catch (\Exception $ex) {
         return $ex->getMessage();
     }
 }
Example #2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('bicycles')->delete();
     Bicycle::create(array('title' => 'Orbea De Puta Madre', 'make' => 'orbea', 'model' => 'h100', 'year' => 2007, 'price' => 300, 'content' => 'Bici estupenda', 'active' => 1, 'fk_id_user' => 1));
 }