예제 #1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Sport::create(['name' => 'OB']);
     Sport::create(['name' => 'LOB']);
     Sport::create(['name' => 'MTBO']);
     Sport::create(['name' => 'TRAIL']);
 }
 public function run()
 {
     $faker = Faker::create();
     foreach (range(0, 2) as $index) {
         Sport::create(['name' => $faker->sentence(1)]);
     }
 }
예제 #3
0
 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function post(Request $request)
 {
     $title = $request->input("title");
     $type = $request->input("special");
     $content = htmlentities($request->input("content"));
     $date = strtotime($request->input("date"));
     Sport::create(['uid' => "1", 'title' => $title, 'type' => $type, 'content' => $content, 'date' => $date]);
     return view('eventmin');
 }
예제 #4
0
 public function store()
 {
     $new = Request::only('identity', 'name', 'count');
     $sport = Sport::create($new);
     return redirect('sports');
 }