2018-10-04 19:10:43 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| API Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Here is where you can register API routes for your application. These
|
|
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
|
|
| is assigned the "api" middleware group. Enjoy building your API!
|
|
|
|
|
|
2018-10-15 07:00:48 +02:00
|
|
|
|
2018-10-04 19:10:43 +02:00
|
|
|
|
|
|
|
Route::middleware('auth:api')->get('/user', function (Request $request) {
|
|
|
|
return $request->user();
|
|
|
|
});
|
2018-10-15 07:00:48 +02:00
|
|
|
*/
|
2019-03-27 05:50:13 +01:00
|
|
|
|
|
|
|
Route::group(['middleware' => ['api_secret_check']], function () {
|
|
|
|
|
2019-04-18 08:11:37 +02:00
|
|
|
Route::post('api/v1/signup', 'AccountController@store')->name('signup.submit');
|
2019-05-22 05:18:18 +02:00
|
|
|
Route::post('api/v1/oauth_login', 'Auth\LoginController@oauthApiLogin');
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2019-03-27 05:50:13 +01:00
|
|
|
});
|
|
|
|
|
2019-11-16 04:12:29 +01:00
|
|
|
Route::group(['api_secret_check','email_db'], function () {
|
2019-07-14 11:34:49 +02:00
|
|
|
|
|
|
|
Route::post('api/v1/login', 'Auth\LoginController@apiLogin')->name('login.submit');
|
2019-09-23 00:24:25 +02:00
|
|
|
Route::post('api/v1/reset_password', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.reset');
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2019-07-14 11:34:49 +02:00
|
|
|
});
|
2019-03-27 05:50:13 +01:00
|
|
|
|
2019-11-13 07:18:24 +01:00
|
|
|
Route::group(['middleware' => ['api_db','api_secret_check','token_auth'], 'prefix' =>'api/v1', 'as' => 'api.'], function () {
|
2019-03-27 05:50:13 +01:00
|
|
|
|
2019-09-27 06:31:13 +02:00
|
|
|
Route::resource('activities', 'ActivityController'); // name = (clients. index / create / show / update / destroy / edit
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2019-03-27 05:50:13 +01:00
|
|
|
Route::resource('clients', 'ClientController'); // name = (clients. index / create / show / update / destroy / edit
|
|
|
|
|
2019-03-27 10:38:28 +01:00
|
|
|
Route::post('clients/bulk', 'ClientController@bulk')->name('clients.bulk');
|
|
|
|
|
2019-03-27 05:50:13 +01:00
|
|
|
Route::resource('invoices', 'InvoiceController'); // name = (invoices. index / create / show / update / destroy / edit
|
|
|
|
|
2019-04-24 03:27:51 +02:00
|
|
|
Route::get('invoices/{invoice}/{action}', 'InvoiceController@action')->name('invoices.action');
|
2019-04-23 06:16:41 +02:00
|
|
|
|
2019-03-27 05:50:13 +01:00
|
|
|
Route::post('invoices/bulk', 'InvoiceController@bulk')->name('invoices.bulk');
|
|
|
|
|
2019-04-03 02:09:22 +02:00
|
|
|
Route::resource('products', 'ProductController'); // name = (products. index / create / show / update / destroy / edit
|
|
|
|
|
|
|
|
Route::post('products/bulk', 'ProductController@bulk')->name('products.bulk');
|
|
|
|
|
2019-03-27 05:50:13 +01:00
|
|
|
Route::resource('quotes', 'QuoteController'); // name = (quotes. index / create / show / update / destroy / edit
|
|
|
|
|
|
|
|
Route::post('quotes/bulk', 'QuoteController@bulk')->name('quotes.bulk');
|
|
|
|
|
|
|
|
Route::resource('recurring_invoices', 'RecurringInvoiceController'); // name = (recurring_invoices. index / create / show / update / destroy / edit
|
|
|
|
|
|
|
|
Route::post('recurring_invoices/bulk', 'RecurringInvoiceController@bulk')->name('recurring_invoices.bulk');
|
|
|
|
|
2019-05-05 02:49:01 +02:00
|
|
|
Route::resource('recurring_quotes', 'RecurringQuoteController'); // name = (recurring_invoices. index / create / show / update / destroy / edit
|
|
|
|
|
|
|
|
Route::post('recurring_quotes/bulk', 'RecurringQuoteController@bulk')->name('recurring_quotes.bulk');
|
|
|
|
|
2019-03-27 05:50:13 +01:00
|
|
|
Route::resource('client_statement', 'ClientStatementController@statement'); // name = (client_statement. index / create / show / update / destroy / edit
|
2019-05-03 10:28:48 +02:00
|
|
|
|
|
|
|
Route::resource('payments', 'PaymentController'); // name = (payments. index / create / show / update / destroy / edit
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2019-05-03 10:28:48 +02:00
|
|
|
Route::post('payments/bulk', 'PaymentController@bulk')->name('payments.bulk');
|
|
|
|
|
2019-10-23 03:01:25 +02:00
|
|
|
// Route::resource('users', 'UserController')->middleware('password_protected'); // name = (users. index / create / show / update / destroy / edit
|
|
|
|
Route::resource('users', 'UserController'); // name = (users. index / create / show / update / destroy / edit
|
2019-06-11 05:20:23 +02:00
|
|
|
|
2019-10-22 13:27:03 +02:00
|
|
|
Route::post('users/bulk', 'UserController@bulk')->name('users.bulk')->middleware('password_protected');
|
2019-06-12 06:22:05 +02:00
|
|
|
|
2019-11-20 08:39:12 +01:00
|
|
|
Route::post('migration/purge/{company}', 'MigrationController@purgeCompany')->middleware('password_protected');
|
|
|
|
Route::post('migration/purge_save_settings/{company}', 'MigrationController@purgeCompanySaveSettings')->middleware('password_protected');
|
2019-11-20 06:41:49 +01:00
|
|
|
|
2019-06-17 02:15:42 +02:00
|
|
|
Route::resource('companies', 'CompanyController'); // name = (companies. index / create / show / update / destroy / edit
|
|
|
|
|
2019-10-03 05:21:24 +02:00
|
|
|
Route::resource('company_gateways', 'CompanyGatewayController');
|
|
|
|
|
2019-10-05 00:58:51 +02:00
|
|
|
Route::resource('group_settings', 'GroupSettingController');
|
|
|
|
|
2019-10-29 03:55:26 +01:00
|
|
|
Route::resource('tax_rates', 'TaxRateController'); // name = (tasks. index / create / show / update / destroy / edit
|
|
|
|
|
2019-09-25 13:49:43 +02:00
|
|
|
Route::post('refresh', 'Auth\LoginController@refresh');
|
2019-11-04 21:50:10 +01:00
|
|
|
|
|
|
|
Route::get('templates/{entity}/create', 'TemplateController@create')->name('templates.create');
|
2019-11-05 11:16:38 +01:00
|
|
|
Route::post('templates/{entity}/{entity_id}', 'TemplateController@show')->name('templates.show');
|
2019-11-04 21:50:10 +01:00
|
|
|
|
2019-04-02 08:36:49 +02:00
|
|
|
/*
|
2019-03-27 05:50:13 +01:00
|
|
|
Route::resource('tasks', 'TaskController'); // name = (tasks. index / create / show / update / destroy / edit
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2019-03-27 05:50:13 +01:00
|
|
|
Route::post('tasks/bulk', 'TaskController@bulk')->name('tasks.bulk');
|
2019-10-16 22:12:38 +02:00
|
|
|
|
|
|
|
|
2019-03-27 05:50:13 +01:00
|
|
|
Route::resource('credits', 'CreditController'); // name = (credits. index / create / show / update / destroy / edit
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2019-03-27 05:50:13 +01:00
|
|
|
Route::post('credits/bulk', 'CreditController@bulk')->name('credits.bulk');
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2019-03-27 05:50:13 +01:00
|
|
|
Route::resource('expenses', 'ExpenseController'); // name = (expenses. index / create / show / update / destroy / edit
|
2019-10-16 22:12:38 +02:00
|
|
|
|
2019-03-27 05:50:13 +01:00
|
|
|
Route::post('expenses/bulk', 'ExpenseController@bulk')->name('expenses.bulk');
|
2019-10-16 22:12:38 +02:00
|
|
|
|
|
|
|
|
2019-03-27 05:50:13 +01:00
|
|
|
Route::get('settings', 'SettingsController@index')->name('user.settings');
|
2019-04-02 08:36:49 +02:00
|
|
|
*/
|
2019-10-16 22:12:38 +02:00
|
|
|
Route::post('support/messages/send', 'Support\Messages\SendingController');
|
2019-03-30 10:30:41 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2019-10-16 22:12:38 +02:00
|
|
|
Route::fallback('BaseController@notFound');
|