コード例 #1
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Grade::firstOrCreate(['value' => 'A+']);
     Grade::firstOrCreate(['value' => 'A']);
     Grade::firstOrCreate(['value' => 'A-']);
     Grade::firstOrCreate(['value' => 'B+']);
     Grade::firstOrCreate(['value' => 'B']);
     Grade::firstOrCreate(['value' => 'B-']);
     Grade::firstOrCreate(['value' => 'C+']);
     Grade::firstOrCreate(['value' => 'C']);
     Grade::firstOrCreate(['value' => 'C-']);
     Grade::firstOrCreate(['value' => 'D+']);
     Grade::firstOrCreate(['value' => 'D']);
     Grade::firstOrCreate(['value' => 'D-']);
     Grade::firstOrCreate(['value' => 'F']);
 }
コード例 #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     Grade::destroy($id);
 }