Last active
March 8, 2018 15:08
-
-
Save duwaljyoti/18c15d4c4fe28df1ea7e5ef92cf3863f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Route::prefix('api')->group(function() { | |
| Route::resource('notes', 'Api\NotesController'); // get all the notes of logged in user. | |
| Route::put('/notes/{note}/toggleFavourite', 'Api\NotesController@toggleFavourite'); // toggle favourite state of note | |
| Route::get('/users', 'Api\UsersController@index'); // gets all the users | |
| Route::get('/users/{user}/notes', 'Api\UsersController@getNotesByUser'); // get notes of a particular user | |
| Route::get('/users/{user}/getFavouriteNotesId', 'Api\NotesController@getFavouriteId'); // gets favourited notes of an user | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment