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