| Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to | and give it the controller to call when that URI is requested. | */ Route::get('/', function () { return view('welcome'); }); Route::group(['middleware' => 'oauth'], function () { Route::resource('clients', 'ClientController', ['except' => ['create', 'edit']]); Route::resource('projects', 'ProjectController', ['except' => ['create', 'edit']]); Route::group(['prefix' => 'projects'], function () { Route::get('{id}/members', 'ProjectController@getMembers'); Route::get('{id}/notes', 'ProjectNoteController@index'); Route::post('{id}/notes', 'ProjectNoteController@store'); Route::get('{id}/notes/{noteId}', 'ProjectNoteController@show'); Route::put('notes/{id}', 'ProjectNoteController@update'); Route::delete('notes/{id}', 'ProjectNoteController@destroy'); Route::post('{id}/file', 'ProjectFileController@store'); }); }); Route::post('oauth/access_token', function () { $input = \Input::all(); $request = \Request::instance(); $request->request->replace($input); Authorizer::setRequest($request); return Response::json(Authorizer::issueAccessToken()); });