Пример #1
0
 /**
  * Find a model by their id.
  *
  * @param $id
  * @return mixed
  */
 public function findById($id)
 {
     return Note::findOrFail($id);
 }
Пример #2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     \Model\Note\Note::truncate();
     // factory(\Model\Note\Note::class, rand(10,20))->create();
 }
Пример #3
0
 public function destroy(Note\Note $note)
 {
     $note->delete();
     return response()->json($note);
 }