Ejemplo n.º 1
0
 public function run()
 {
     DB::table('sponsors')->truncate();
     $sponsors = [['name' => 'Optymyze', 'image' => 'optymyze.png', 'link' => 'http://www.optymyze.com/'], ['name' => 'Yonder', 'image' => 'yonder.png', 'link' => 'http://tss-yonder.com/'], ['name' => 'Beenear', 'image' => 'beenear.png', 'link' => 'http://www.beenear.com/']];
     foreach ($sponsors as $sponsor) {
         Sponsor::create($sponsor);
     }
 }
Ejemplo n.º 2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     with(Sponsor::findOrFail($id))->delete();
     return json(1);
 }