public function testNoteThrowException() { $this->setExpectedException(ModelNotFoundException::class); $user = \App\User::find(21); $repo = new NotesRepository(); $repo->getNoteOfUserById(null, $user); }
public function index(NotesRepository $notes) { return view('notes.app', ['notes' => $notes->getNotesOfUser(\Auth::user())]); }