. */ Route::group( ['middleware' => ['auth:api', 'bindings'], 'namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'about', 'as' => 'api.v1.about.'], function () { // Accounts API routes: Route::get('', ['uses' => 'AboutController@about', 'as' => 'index']); Route::get('user', ['uses' => 'AboutController@user', 'as' => 'user']); } ); Route::group( ['middleware' => ['auth:api', 'bindings'], 'namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'accounts', 'as' => 'api.v1.accounts.'], function () { // Accounts API routes: Route::get('', ['uses' => 'AccountController@index', 'as' => 'index']); Route::post('', ['uses' => 'AccountController@store', 'as' => 'store']); Route::get('{account}', ['uses' => 'AccountController@show', 'as' => 'show']); Route::put('{account}', ['uses' => 'AccountController@update', 'as' => 'update']); Route::delete('{account}', ['uses' => 'AccountController@delete', 'as' => 'delete']); } ); Route::group( ['middleware' => ['auth:api', 'bindings'], 'namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'bills', 'as' => 'api.v1.bills.'], function () { // Bills API routes: Route::get('', ['uses' => 'BillController@index', 'as' => 'index']); Route::post('', ['uses' => 'BillController@store', 'as' => 'store']); Route::get('{bill}', ['uses' => 'BillController@show', 'as' => 'show']); Route::put('{bill}', ['uses' => 'BillController@update', 'as' => 'update']); Route::delete('{bill}', ['uses' => 'BillController@delete', 'as' => 'delete']); } ); Route::group( ['middleware' => ['auth:api', 'bindings'], 'namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'currencies', 'as' => 'api.v1.currencies.'], function () { // Transaction currency API routes: Route::get('', ['uses' => 'CurrencyController@index', 'as' => 'index']); Route::post('', ['uses' => 'CurrencyController@store', 'as' => 'store']); Route::get('{currency}', ['uses' => 'CurrencyController@show', 'as' => 'show']); Route::put('{currency}', ['uses' => 'CurrencyController@update', 'as' => 'update']); Route::delete('{currency}', ['uses' => 'CurrencyController@delete', 'as' => 'delete']); } ); Route::group( ['middleware' => ['auth:api', 'bindings'], 'namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'transactions', 'as' => 'api.v1.transactions.'], function () { // Transaction API routes: Route::get('', ['uses' => 'TransactionController@index', 'as' => 'index']); Route::post('', ['uses' => 'TransactionController@store', 'as' => 'store']); Route::get('{transaction}', ['uses' => 'TransactionController@show', 'as' => 'show']); Route::put('{transaction}', ['uses' => 'TransactionController@update', 'as' => 'update']); Route::delete('{transaction}', ['uses' => 'TransactionController@delete', 'as' => 'delete']); } ); Route::group( ['middleware' => ['auth:api', 'bindings', \FireflyIII\Http\Middleware\IsAdmin::class], 'namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'users', 'as' => 'api.v1.users.'], function () { // Users API routes: Route::get('', ['uses' => 'UserController@index', 'as' => 'index']); Route::post('', ['uses' => 'UserController@store', 'as' => 'store']); Route::get('{user}', ['uses' => 'UserController@show', 'as' => 'show']); Route::put('{user}', ['uses' => 'UserController@update', 'as' => 'update']); Route::delete('{user}', ['uses' => 'UserController@delete', 'as' => 'delete']); } );