mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Fixes for preview branch
This commit is contained in:
parent
18c89239dd
commit
6470aba3bf
243
routes/api.php
243
routes/api.php
@ -94,119 +94,7 @@ use App\Http\Controllers\WebCronController;
|
||||
use App\Http\Controllers\WebhookController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::group(['middleware' => ['throttle:300,1', 'api_secret_check']], function () {
|
||||
Route::post('api/v1/signup', [AccountController::class, 'store'])->name('signup.submit');
|
||||
Route::post('api/v1/oauth_login', [LoginController::class, 'oauthApiLogin']);
|
||||
});
|
||||
|
||||
Route::group(['middleware' => ['throttle:10,1','api_secret_check','email_db']], function () {
|
||||
Route::post('api/v1/login', [LoginController::class, 'apiLogin'])->name('login.submit')->middleware('throttle:20,1');
|
||||
Route::post('api/v1/reset_password', [ForgotPasswordController::class, 'sendResetLinkEmail']);
|
||||
});
|
||||
|
||||
Route::group(['middleware' => ['throttle:300,1', 'api_db', 'token_auth', 'locale'], 'prefix' => 'api/v1', 'as' => 'api.'], function () {
|
||||
Route::put('accounts/{account}', [AccountController::class, 'update'])->name('account.update');
|
||||
Route::post('check_subdomain', [SubdomainController::class, 'index'])->name('check_subdomain');
|
||||
Route::get('ping', [PingController::class, 'index'])->name('ping');
|
||||
Route::get('health_check', [PingController::class, 'health'])->name('health_check');
|
||||
|
||||
Route::get('activities', [ActivityController::class, 'index']);
|
||||
Route::get('activities/download_entity/{activity}', [ActivityController::class, 'downloadHistoricalEntity']);
|
||||
|
||||
|
||||
Route::post('charts/totals', [ChartController::class, 'totals'])->name('chart.totals');
|
||||
Route::post('charts/chart_summary', [ChartController::class, 'chart_summary'])->name('chart.chart_summary');
|
||||
|
||||
Route::post('claim_license', [LicenseController::class, 'index'])->name('license.index');
|
||||
|
||||
Route::resource('clients', ClientController::class); // name = (clients. index / create / show / update / destroy / edit
|
||||
Route::put('clients/{client}/adjust_ledger', [ClientController::class, 'adjustLedger'])->name('clients.adjust_ledger');
|
||||
Route::put('clients/{client}/upload', [ClientController::class, 'upload'])->name('clients.upload');
|
||||
Route::post('clients/{client}/purge', [ClientController::class, 'purge'])->name('clients.purge')->middleware('password_protected');
|
||||
Route::post('clients/{client}/{mergeable_client}/merge', [ClientController::class, 'merge'])->name('clients.merge')->middleware('password_protected');
|
||||
Route::post('clients/bulk', [ClientController::class, 'bulk'])->name('clients.bulk');
|
||||
|
||||
Route::post('filters/{entity}', [FilterController::class, 'index'])->name('filters');
|
||||
|
||||
Route::resource('client_gateway_tokens', ClientGatewayTokenController::class);
|
||||
|
||||
Route::post('connected_account', [ConnectedAccountController::class, 'index']);
|
||||
Route::post('connected_account/gmail', [ConnectedAccountController::class, 'handleGmailOauth']);
|
||||
|
||||
Route::post('client_statement', [ClientStatementController::class, 'statement'])->name('client.statement');
|
||||
|
||||
Route::post('companies/purge/{company}', [MigrationController::class, 'purgeCompany'])->middleware('password_protected');
|
||||
Route::post('companies/purge_save_settings/{company}', [MigrationController::class, 'purgeCompanySaveSettings'])->middleware('password_protected');
|
||||
|
||||
Route::resource('companies', CompanyController::class); // name = (companies. index / create / show / update / destroy / edit
|
||||
|
||||
Route::put('companies/{company}/upload', [CompanyController::class, 'upload']);
|
||||
Route::post('companies/{company}/default', [CompanyController::class, 'default']);
|
||||
|
||||
Route::get('company_ledger', [CompanyLedgerController::class, 'index'])->name('company_ledger.index');
|
||||
|
||||
Route::resource('company_gateways', CompanyGatewayController::class);
|
||||
Route::post('company_gateways/bulk', [CompanyGatewayController::class, 'bulk'])->name('company_gateways.bulk');
|
||||
|
||||
Route::put('company_users/{user}', [CompanyUserController::class, 'update']);
|
||||
|
||||
Route::resource('credits', CreditController::class); // name = (credits. index / create / show / update / destroy / edit
|
||||
Route::put('credits/{credit}/upload', [CreditController::class, 'upload'])->name('credits.upload');
|
||||
Route::get('credits/{credit}/{action}', [CreditController::class, 'action'])->name('credits.action');
|
||||
Route::post('credits/bulk', [CreditController::class, 'bulk'])->name('credits.bulk');
|
||||
|
||||
Route::resource('designs', DesignController::class); // name = (payments. index / create / show / update / destroy / edit
|
||||
Route::post('designs/bulk', [DesignController::class, 'bulk'])->name('designs.bulk');
|
||||
Route::post('designs/set/default', [DesignController::class, 'default'])->name('designs.default');
|
||||
|
||||
Route::resource('documents', DocumentController::class); // name = (documents. index / create / show / update / destroy / edit
|
||||
Route::get('documents/{document}/download', [DocumentController::class, 'download'])->name('documents.download');
|
||||
Route::post('documents/bulk', [DocumentController::class, 'bulk'])->name('documents.bulk');
|
||||
|
||||
Route::post('emails', [EmailController::class, 'send'])->name('email.send')->middleware('user_verified');
|
||||
|
||||
Route::resource('expenses', ExpenseController::class); // name = (expenses. index / create / show / update / destroy / edit
|
||||
Route::put('expenses/{expense}/upload', [ExpenseController::class, 'upload']);
|
||||
Route::post('expenses/bulk', [ExpenseController::class, 'bulk'])->name('expenses.bulk');
|
||||
|
||||
Route::post('export', [ExportController::class, 'index'])->name('export.index');
|
||||
|
||||
Route::resource('expense_categories', ExpenseCategoryController::class); // name = (expense_categories. index / create / show / update / destroy / edit
|
||||
Route::post('expense_categories/bulk', [ExpenseCategoryController::class, 'bulk'])->name('expense_categories.bulk');
|
||||
|
||||
Route::resource('group_settings', GroupSettingController::class);
|
||||
Route::post('group_settings/bulk', [GroupSettingController::class, 'bulk']);
|
||||
Route::put('group_settings/{group_setting}/upload', [GroupSettingController::class, 'upload'])->name('group_settings.upload');
|
||||
|
||||
Route::post('import', [ImportController::class, 'import'])->name('import.import');
|
||||
Route::post('import_json', [ImportJsonController::class, 'import'])->name('import.import_json');
|
||||
Route::post('preimport', [ImportController::class, 'preimport'])->name('import.preimport');
|
||||
|
||||
Route::resource('invoices', InvoiceController::class); // name = (invoices. index / create / show / update / destroy / edit
|
||||
Route::get('invoices/{invoice}/delivery_note', [InvoiceController::class, 'deliveryNote'])->name('invoices.delivery_note');
|
||||
Route::get('invoices/{invoice}/{action}', [InvoiceController::class, 'action'])->name('invoices.action');
|
||||
Route::put('invoices/{invoice}/upload', [InvoiceController::class, 'upload'])->name('invoices.upload');
|
||||
Route::get('invoice/{invitation_key}/download', [InvoiceController::class, 'downloadPdf'])->name('invoices.downloadPdf');
|
||||
Route::post('invoices/bulk', [InvoiceController::class, 'bulk'])->name('invoices.bulk');
|
||||
Route::post('invoices/update_reminders', [InvoiceController::class, 'update_reminders'])->name('invoices.update_reminders');
|
||||
|
||||
Route::post('logout', [LogoutController::class, 'index'])->name('logout');
|
||||
|
||||
Route::post('migrate', [MigrationController::class, 'index'])->name('migrate.start');
|
||||
|
||||
Route::post('migration/purge/{company}', [MigrationController::class, 'purgeCompany'])->middleware('password_protected');
|
||||
Route::post('migration/purge_save_settings/{company}', [MigrationController::class, 'purgeCompanySaveSettings'])->middleware('password_protected');
|
||||
Route::post('migration/start', [MigrationController::class, 'startMigration']);
|
||||
|
||||
Route::post('one_time_token', [OneTimeTokenController::class, 'create']);
|
||||
|
||||
Route::resource('payments', PaymentController::class); // name = (payments. index / create / show / update / destroy / edit
|
||||
Route::post('payments/refund', [PaymentController::class, 'refund'])->name('payments.refund');
|
||||
Route::post('payments/bulk', [PaymentController::class, 'bulk'])->name('payments.bulk');
|
||||
Route::put('payments/{payment}/upload', [PaymentController::class, 'upload']);
|
||||
|
||||
Route::resource('payment_terms', PaymentTermController::class); // name = (payments. index / create / show / update / destroy / edit
|
||||
Route::post('payment_terms/bulk', [PaymentTermController::class, 'bulk'])->name('payment_terms.bulk');
|
||||
|
||||
Route::post('preview', [PreviewController::class, 'show'])->name('preview.show');
|
||||
Route::post('live_preview', [PreviewController::class, 'live'])->name('preview.live');
|
||||
@ -214,137 +102,6 @@ Route::group(['middleware' => ['throttle:300,1', 'api_db', 'token_auth', 'locale
|
||||
Route::post('preview/purchase_order', [PreviewPurchaseOrderController::class, 'show'])->name('preview_purchase_order.show');
|
||||
Route::post('live_preview/purchase_order', [PreviewPurchaseOrderController::class, 'live'])->name('preview_purchase_order.live');
|
||||
|
||||
Route::resource('products', ProductController::class); // name = (products. index / create / show / update / destroy / edit
|
||||
Route::post('products/bulk', [ProductController::class, 'bulk'])->name('products.bulk');
|
||||
Route::put('products/{product}/upload', [ProductController::class, 'upload']);
|
||||
|
||||
Route::resource('projects', ProjectController::class); // name = (projects. index / create / show / update / destroy / edit
|
||||
Route::post('projects/bulk', [ProjectController::class, 'bulk'])->name('projects.bulk');
|
||||
Route::put('projects/{project}/upload', [ProjectController::class, 'upload'])->name('projects.upload');
|
||||
|
||||
Route::resource('quotes', QuoteController::class); // name = (quotes. index / create / show / update / destroy / edit
|
||||
Route::get('quotes/{quote}/{action}', [QuoteController::class, 'action'])->name('quotes.action');
|
||||
Route::post('quotes/bulk', [QuoteController::class, 'bulk'])->name('quotes.bulk');
|
||||
Route::put('quotes/{quote}/upload', [QuoteController::class, 'upload']);
|
||||
|
||||
Route::resource('recurring_expenses', RecurringExpenseController::class);
|
||||
Route::post('recurring_expenses/bulk', [RecurringExpenseController::class, 'bulk'])->name('recurring_expenses.bulk');
|
||||
Route::put('recurring_expenses/{recurring_expense}/upload', [RecurringExpenseController::class, 'upload']);
|
||||
|
||||
|
||||
Route::resource('recurring_invoices', RecurringInvoiceController::class); // name = (recurring_invoices. index / create / show / update / destroy / edit
|
||||
Route::post('recurring_invoices/bulk', [RecurringInvoiceController::class, 'bulk'])->name('recurring_invoices.bulk');
|
||||
Route::put('recurring_invoices/{recurring_invoice}/upload', [RecurringInvoiceController::class, 'upload']);
|
||||
Route::resource('recurring_quotes', RecurringQuoteController::class); // name = (recurring_invoices. index / create / show / update / destroy / edit
|
||||
Route::post('recurring_quotes/bulk', [RecurringQuoteController::class, 'bulk'])->name('recurring_quotes.bulk');
|
||||
Route::put('recurring_quotes/{recurring_quote}/upload', [RecurringQuoteController::class, 'upload']);
|
||||
|
||||
Route::post('refresh', [LoginController::class, 'refresh'])->middleware('throttle:300,2');
|
||||
|
||||
Route::post('reports/clients', ClientReportController::class);
|
||||
Route::post('reports/contacts', ClientContactReportController::class);
|
||||
Route::post('reports/credits', CreditReportController::class);
|
||||
Route::post('reports/documents', DocumentReportController::class);
|
||||
Route::post('reports/expenses', ExpenseReportController::class);
|
||||
Route::post('reports/invoices', InvoiceReportController::class);
|
||||
Route::post('reports/invoice_items', InvoiceItemReportController::class);
|
||||
Route::post('reports/quotes', QuoteReportController::class);
|
||||
Route::post('reports/quote_items', QuoteItemReportController::class);
|
||||
Route::post('reports/recurring_invoices', RecurringInvoiceReportController::class);
|
||||
Route::post('reports/payments', PaymentReportController::class);
|
||||
Route::post('reports/products', ProductReportController::class);
|
||||
Route::post('reports/tasks', TaskReportController::class);
|
||||
Route::post('reports/profitloss', ProfitAndLossController::class);
|
||||
|
||||
Route::resource('task_scheduler', TaskSchedulerController::class)->except('edit')->parameters(['task_scheduler' => 'scheduler']);
|
||||
|
||||
Route::get('scheduler', [SchedulerController::class, 'index']);
|
||||
Route::post('support/messages/send', [SendingController::class]);
|
||||
|
||||
Route::post('self-update', [SelfUpdateController::class, 'update'])->middleware('password_protected');
|
||||
Route::post('self-update/check_version', [SelfUpdateController::class, 'checkVersion']);
|
||||
|
||||
Route::resource('system_logs', SystemLogController::class);
|
||||
|
||||
Route::resource('tasks', TaskController::class); // name = (tasks. index / create / show / update / destroy / edit
|
||||
Route::post('tasks/bulk', [TaskController::class, 'bulk'])->name('tasks.bulk');
|
||||
Route::put('tasks/{task}/upload', [TaskController::class, 'upload']);
|
||||
Route::post('tasks/sort', [TaskController::class, 'sort']);
|
||||
|
||||
Route::resource('task_statuses', TaskStatusController::class); // name = (task_statuses. index / create / show / update / destroy / edit
|
||||
Route::post('task_statuses/bulk', [TaskStatusController::class, 'bulk'])->name('task_statuses.bulk');
|
||||
|
||||
Route::resource('tax_rates', TaxRateController::class); // name = (tax_rates. index / create / show / update / destroy / edit
|
||||
Route::post('tax_rates/bulk', [TaxRateController::class, 'bulk'])->name('tax_rates.bulk');
|
||||
|
||||
Route::post('templates', [TemplateController::class, 'show'])->name('templates.show');
|
||||
|
||||
Route::resource('tokens', TokenController::class); // name = (tokens. index / create / show / update / destroy / edit
|
||||
Route::post('tokens/bulk', [TokenController::class, 'bulk'])->name('tokens.bulk');
|
||||
|
||||
Route::get('settings/enable_two_factor', [TwoFactorController::class, 'setupTwoFactor']);
|
||||
Route::post('settings/enable_two_factor', [TwoFactorController::class, 'enableTwoFactor']);
|
||||
Route::post('settings/disable_two_factor', [TwoFactorController::class, 'disableTwoFactor']);
|
||||
|
||||
|
||||
Route::post('verify', [TwilioController::class, 'generate'])->name('verify.generate')->middleware('throttle:5,1');
|
||||
Route::post('verify/confirm', [TwilioController::class, 'confirm'])->name('verify.confirm');
|
||||
|
||||
Route::resource('vendors', VendorController::class); // name = (vendors. index / create / show / update / destroy / edit
|
||||
Route::post('vendors/bulk', [VendorController::class, 'bulk'])->name('vendors.bulk');
|
||||
Route::put('vendors/{vendor}/upload', [VendorController::class, 'upload']);
|
||||
|
||||
Route::resource('purchase_orders', PurchaseOrderController::class);
|
||||
Route::post('purchase_orders/bulk', [PurchaseOrderController::class, 'bulk'])->name('purchase_orders.bulk');
|
||||
Route::put('purchase_orders/{purchase_order}/upload', [PurchaseOrderController::class, 'upload']);
|
||||
|
||||
Route::get('purchase_orders/{purchase_order}/{action}', [PurchaseOrderController::class, 'action'])->name('purchase_orders.action');
|
||||
|
||||
Route::get('users', [UserController::class, 'index']);
|
||||
Route::get('users/create', [UserController::class, 'create'])->middleware('password_protected');
|
||||
Route::get('users/{user}', [UserController::class, 'show'])->middleware('password_protected');
|
||||
Route::put('users/{user}', [UserController::class, 'update'])->middleware('password_protected');
|
||||
Route::post('users', [UserController::class, 'store'])->middleware('password_protected');
|
||||
//Route::post('users/{user}/attach_to_company', [UserController::class, 'attach')->middleware('password_protected');
|
||||
Route::delete('users/{user}/detach_from_company', [UserController::class, 'detach'])->middleware('password_protected');
|
||||
|
||||
Route::post('users/bulk', [UserController::class, 'bulk'])->name('users.bulk')->middleware('password_protected');
|
||||
Route::post('/users/{user}/invite', [UserController::class, 'invite'])->middleware('password_protected');
|
||||
Route::post('/user/{user}/reconfirm', [UserController::class, 'reconfirm']);
|
||||
|
||||
Route::resource('webhooks', WebhookController::class);
|
||||
Route::post('webhooks/bulk', [WebhookController::class, 'bulk'])->name('webhooks.bulk');
|
||||
|
||||
/*Subscription and Webhook routes */
|
||||
// Route::post('hooks', [SubscriptionController::class, 'subscribe'])->name('hooks.subscribe');
|
||||
// Route::delete('hooks/{subscription_id}', [SubscriptionController::class, 'unsubscribe'])->name('hooks.unsubscribe');
|
||||
|
||||
Route::post('stripe/update_payment_methods', [StripeController::class, 'update'])->middleware('password_protected')->name('stripe.update');
|
||||
Route::post('stripe/import_customers', [StripeController::class, 'import'])->middleware('password_protected')->name('stripe.import');
|
||||
|
||||
Route::post('stripe/verify', [StripeController::class, 'verify'])->middleware('password_protected')->name('stripe.verify');
|
||||
Route::post('stripe/disconnect/{company_gateway_id}', [StripeController::class, 'disconnect'])->middleware('password_protected')->name('stripe.disconnect');
|
||||
|
||||
Route::resource('subscriptions', SubscriptionController::class);
|
||||
Route::post('subscriptions/bulk', [SubscriptionController::class, 'bulk'])->name('subscriptions.bulk');
|
||||
Route::get('statics', StaticController::class);
|
||||
// Route::post('apple_pay/upload_file','ApplyPayController::class, 'upload');
|
||||
|
||||
});
|
||||
|
||||
Route::match(['get', 'post'], 'payment_webhook/{company_key}/{company_gateway_id}', [PaymentWebhookController::class])
|
||||
->middleware(['throttle:1000,1','guest'])
|
||||
->name('payment_webhook');
|
||||
|
||||
Route::match(['get', 'post'], 'payment_notification_webhook/{company_key}/{company_gateway_id}/{client}', [PaymentNotificationWebhookController::class])
|
||||
->middleware(['throttle:1000,1', 'guest'])
|
||||
->name('payment_notification_webhook');
|
||||
|
||||
Route::post('api/v1/postmark_webhook', [PostMarkController::class, 'webhook'])->middleware('throttle:1000,1');
|
||||
Route::get('token_hash_router', [OneTimeTokenController::class, 'router'])->middleware('throttle:100,1');
|
||||
Route::get('webcron', [WebCronController::class, 'index'])->middleware('throttle:100,1');
|
||||
Route::post('api/v1/get_migration_account', [HostedMigrationController::class, 'getAccount'])->middleware('guest')->middleware('throttle:100,1');
|
||||
Route::post('api/v1/confirm_forwarding', [HostedMigrationController::class, 'confirmForwarding'])->middleware('guest')->middleware('throttle:100,1');
|
||||
Route::post('api/v1/process_webhook', [AppleController::class, 'process_webhook'])->middleware('throttle:1000,1');
|
||||
Route::post('api/v1/confirm_purchase', [AppleController::class, 'confirm_purchase'])->middleware('throttle:1000,1');
|
||||
Route::fallback([BaseController::class, 'notFound']);
|
||||
|
@ -16,122 +16,4 @@ use App\Http\Controllers\RecurringInvoiceController;
|
||||
use App\Utils\PhantomJS\Phantom;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('client', [ContactLoginController::class, 'showLoginForm'])->name('client.catchall')->middleware(['domain_db', 'contact_account','locale']); //catch all
|
||||
|
||||
Route::get('client/login/{company_key?}', [ContactLoginController::class, 'showLoginForm'])->name('client.login')->middleware(['domain_db', 'contact_account','locale']);
|
||||
Route::post('client/login/{company_key?}', [ContactLoginController::class, 'login'])->name('client.login.submit');
|
||||
|
||||
Route::get('client/register/{company_key?}', [ContactRegisterController::class, 'showRegisterForm'])->name('client.register')->middleware(['domain_db', 'contact_account', 'contact_register','locale']);
|
||||
Route::post('client/register/{company_key?}', [ContactRegisterController::class, 'register'])->middleware(['domain_db', 'contact_account', 'contact_register', 'locale', 'throttle:10,1']);
|
||||
|
||||
Route::get('client/password/reset', [ContactForgotPasswordController::class, 'showLinkRequestForm'])->name('client.password.request')->middleware(['domain_db', 'contact_account','locale']);
|
||||
Route::post('client/password/email', [ContactForgotPasswordController::class, 'sendResetLinkEmail'])->name('client.password.email')->middleware('locale');
|
||||
Route::get('client/password/reset/{token}', [ContactResetPasswordController::class, 'showResetForm'])->name('client.password.reset')->middleware(['domain_db', 'contact_account','locale']);
|
||||
Route::post('client/password/reset', [ContactResetPasswordController::class, 'reset'])->name('client.password.update')->middleware(['domain_db', 'contact_account','locale']);
|
||||
|
||||
Route::get('view/{entity_type}/{invitation_key}', [App\Http\Controllers\ClientPortal\EntityViewController::class, 'index'])->name('client.entity_view');
|
||||
Route::get('view/{entity_type}/{invitation_key}/password', [App\Http\Controllers\ClientPortal\EntityViewController::class ,'password'])->name('client.entity_view.password');
|
||||
Route::post('view/{entity_type}/{invitation_key}/password', [App\Http\Controllers\ClientPortal\EntityViewController::class, 'handlePassword']);
|
||||
Route::post('set_password', [App\Http\Controllers\ClientPortal\EntityViewController::class, 'handlePasswordSet'])->name('client.set_password')->middleware('domain_db');
|
||||
|
||||
Route::get('tmp_pdf/{hash}', [App\Http\Controllers\ClientPortal\TempRouteController::class, 'index'])->name('tmp_pdf');
|
||||
|
||||
Route::get('client/key_login/{contact_key}', [App\Http\Controllers\ClientPortal\ContactHashLoginController::class, 'login'])->name('client.contact_login')->middleware(['domain_db','contact_key_login']);
|
||||
Route::get('client/magic_link/{magic_link}', [App\Http\Controllers\ClientPortal\ContactHashLoginController::class, 'magicLink'])->name('client.contact_magic_link')->middleware(['domain_db','contact_key_login']);
|
||||
Route::get('documents/{document_hash}', [App\Http\Controllers\ClientPortal\DocumentController::class, 'publicDownload'])->name('documents.public_download')->middleware(['domain_db']);
|
||||
Route::get('error', [App\Http\Controllers\ClientPortal\ContactHashLoginController::class, 'errorPage'])->name('client.error');
|
||||
Route::get('client/payment/{contact_key}/{payment_id}', [App\Http\Controllers\ClientPortal\InvitationController::class, 'paymentRouter'])->middleware(['domain_db','contact_key_login']);
|
||||
Route::get('client/ninja/{contact_key}/{company_key}', [App\Http\Controllers\ClientPortal\NinjaPlanController::class, 'index'])->name('client.ninja_contact_login')->middleware(['domain_db']);
|
||||
Route::post('client/ninja/trial_confirmation', [App\Http\Controllers\ClientPortal\NinjaPlanController::class, 'trial_confirmation'])->name('client.trial.response')->middleware(['domain_db']);
|
||||
|
||||
Route::group(['middleware' => ['auth:contact', 'locale', 'domain_db','check_client_existence'], 'prefix' => 'client', 'as' => 'client.'], function () {
|
||||
Route::get('dashboard', [App\Http\Controllers\ClientPortal\DashboardController::class, 'index'])->name('dashboard'); // name = (dashboard. index / create / show / update / destroy / edit
|
||||
|
||||
Route::get('plan', [App\Http\Controllers\ClientPortal\NinjaPlanController::class, 'plan'])->name('plan'); // name = (dashboard. index / create / show / update / destroy / edit
|
||||
|
||||
Route::get('invoices', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'index'])->name('invoices.index')->middleware('portal_enabled');
|
||||
Route::post('invoices/payment', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'bulk'])->name('invoices.bulk');
|
||||
Route::get('invoices/payment', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'catch_bulk'])->name('invoices.catch_bulk');
|
||||
Route::post('invoices/download', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'download'])->name('invoices.download');
|
||||
Route::get('invoices/{invoice}', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'show'])->name('invoice.show');
|
||||
Route::get('invoices/{invoice_invitation}', [App\Http\Controllers\ClientPortal\InvoiceController::class, 'show'])->name('invoice.show_invitation');
|
||||
|
||||
Route::get('recurring_invoices', [App\Http\Controllers\ClientPortal\RecurringInvoiceController::class, 'index'])->name('recurring_invoices.index')->middleware('portal_enabled');
|
||||
Route::get('recurring_invoices/{recurring_invoice}', [App\Http\Controllers\ClientPortal\RecurringInvoiceController::class, 'show'])->name('recurring_invoice.show');
|
||||
Route::get('recurring_invoices/{recurring_invoice}/request_cancellation', [App\Http\Controllers\ClientPortal\RecurringInvoiceController::class, 'requestCancellation'])->name('recurring_invoices.request_cancellation');
|
||||
Route::post('payments/process', [App\Http\Controllers\ClientPortal\PaymentController::class, 'process'])->name('payments.process');
|
||||
Route::get('payments/process', [App\Http\Controllers\ClientPortal\PaymentController::class, 'catch_process'])->name('payments.catch_process');
|
||||
|
||||
Route::post('payments/credit_response', [App\Http\Controllers\ClientPortal\PaymentController::class, 'credit_response'])->name('payments.credit_response');
|
||||
|
||||
Route::get('payments', [App\Http\Controllers\ClientPortal\PaymentController::class, 'index'])->name('payments.index')->middleware('portal_enabled');
|
||||
Route::get('payments/{payment}', [App\Http\Controllers\ClientPortal\PaymentController::class, 'show'])->name('payments.show');
|
||||
|
||||
Route::get('profile/{client_contact}/edit', [App\Http\Controllers\ClientPortal\ProfileController::class, 'edit'])->name('profile.edit');
|
||||
Route::put('profile/{client_contact}/edit', [App\Http\Controllers\ClientPortal\ProfileController::class, 'update'])->name('profile.update');
|
||||
Route::put('profile/{client_contact}/edit_client', [App\Http\Controllers\ClientPortal\ProfileController::class, 'updateClient'])->name('profile.edit_client');
|
||||
Route::put('profile/{client_contact}/localization', [App\Http\Controllers\ClientPortal\ProfileController::class, 'updateClientLocalization'])->name('profile.edit_localization');
|
||||
|
||||
Route::get('payment_methods/{payment_method}/verification', [App\Http\Controllers\ClientPortal\PaymentMethodController::class, 'verify'])->name('payment_methods.verification');
|
||||
Route::post('payment_methods/{payment_method}/verification', [App\Http\Controllers\ClientPortal\PaymentMethodController::class, 'processVerification'])->middleware(['throttle:10,1']);
|
||||
|
||||
Route::get('payment_methods/confirm', [App\Http\Controllers\ClientPortal\PaymentMethodController::class, 'store'])->name('payment_methods.confirm');
|
||||
|
||||
Route::resource('payment_methods', PaymentMethodController::class)->except(['edit', 'update']);
|
||||
|
||||
Route::match(['GET', 'POST'], 'quotes/approve', [App\Http\Controllers\ClientPortal\QuoteController::class, 'bulk'])->name('quotes.bulk');
|
||||
Route::get('quotes', [App\Http\Controllers\ClientPortal\QuoteController::class, 'index'])->name('quotes.index')->middleware('portal_enabled');
|
||||
Route::get('quotes/{quote}', [App\Http\Controllers\ClientPortal\QuoteController::class, 'show'])->name('quote.show');
|
||||
Route::get('quotes/{quote_invitation}', [App\Http\Controllers\ClientPortal\QuoteController::class, 'show'])->name('quote.show_invitation');
|
||||
Route::post('quotes/download', [App\Http\Controllers\ClientPortal\QuoteController::class, 'download'])->name('quotes.download');
|
||||
|
||||
Route::get('credits', [App\Http\Controllers\ClientPortal\CreditController::class, 'index'])->name('credits.index');
|
||||
Route::get('credits/{credit}', [App\Http\Controllers\ClientPortal\CreditController::class, 'show'])->name('credit.show');
|
||||
|
||||
Route::get('credits/{credit_invitation}', [App\Http\Controllers\ClientPortal\CreditController::class,'show'])->name('credits.show_invitation');
|
||||
|
||||
Route::get('client/switch_company/{contact}', [App\Http\Controllers\ClientPortal\SwitchCompanyController::class])->name('switch_company');
|
||||
|
||||
Route::post('documents/download_multiple', [App\Http\Controllers\ClientPortal\DocumentController::class, 'downloadMultiple'])->name('documents.download_multiple');
|
||||
Route::get('documents/{document}/download', [App\Http\Controllers\ClientPortal\DocumentController::class, 'download'])->name('documents.download');
|
||||
Route::resource('documents', App\Http\Controllers\ClientPortal\DocumentController::class)->only(['index', 'show']);
|
||||
|
||||
Route::get('subscriptions/{recurring_invoice}/plan_switch/{target}', [App\Http\Controllers\ClientPortal\SubscriptionPlanSwitchController::class, 'index'])->name('subscription.plan_switch');
|
||||
|
||||
Route::resource('subscriptions', SubscriptionController::class)->middleware('portal_enabled')->only(['index']);
|
||||
|
||||
Route::resource('tasks', TaskController::class)->only(['index']);
|
||||
|
||||
Route::get('statement', [App\Http\Controllers\ClientPortal\StatementController::class, 'index'])->name('statement');
|
||||
Route::get('statement/raw', [App\Http\Controllers\ClientPortal\StatementController::class, 'raw'])->name('statement.raw');
|
||||
|
||||
Route::post('upload', [App\Http\Controllers\ClientPortal\UploadController::class])->name('upload.store');
|
||||
Route::get('logout', [ContactLoginController::class, 'logout'])->name('logout');
|
||||
|
||||
});
|
||||
|
||||
Route::post('payments/process/response', [App\Http\Controllers\ClientPortal\PaymentController::class, 'response'])->name('client.payments.response')->middleware(['locale', 'domain_db', 'verify_hash']);
|
||||
Route::get('payments/process/response', [App\Http\Controllers\ClientPortal\PaymentController::class, 'response'])->name('client.payments.response.get')->middleware(['locale', 'domain_db', 'verify_hash']);
|
||||
|
||||
Route::get('client/subscriptions/{subscription}/purchase', [App\Http\Controllers\ClientPortal\SubscriptionPurchaseController::class, 'index'])->name('client.subscription.purchase')->middleware('domain_db');
|
||||
|
||||
Route::group(['middleware' => ['invite_db'], 'prefix' => 'client', 'as' => 'client.'], function () {
|
||||
/*Invitation catches*/
|
||||
Route::get('recurring_invoice/{invitation_key}', [App\Http\Controllers\ClientPortal\InvitationController::class, 'recurringRouter']);
|
||||
Route::get('invoice/{invitation_key}', [App\Http\Controllers\ClientPortal\InvitationController::class, 'invoiceRouter']);
|
||||
Route::get('quote/{invitation_key}', [App\Http\Controllers\ClientPortal\InvitationController::class, 'quoteRouter']);
|
||||
Route::get('credit/{invitation_key}', [App\Http\Controllers\ClientPortal\InvitationController::class, 'creditRouter']);
|
||||
Route::get('recurring_invoice/{invitation_key}/download_pdf', [RecurringInvoiceController::class, 'downloadPdf'])->name('recurring_invoice.download_invitation_key');
|
||||
Route::get('invoice/{invitation_key}/download_pdf', [InvoiceController::class, 'downloadPdf'])->name('invoice.download_invitation_key');
|
||||
Route::get('quote/{invitation_key}/download_pdf', [QuoteController::class, 'downloadPdf'])->name('quote.download_invitation_key');
|
||||
Route::get('credit/{invitation_key}/download_pdf', [CreditController::class, 'downloadPdf'])->name('credit.download_invitation_key');
|
||||
Route::get('{entity}/{invitation_key}/download', [App\Http\Controllers\ClientPortal\InvitationController::class, 'routerForDownload']);
|
||||
Route::get('pay/{invitation_key}', [App\Http\Controllers\ClientPortal\InvitationController::class, 'payInvoice'])->name('pay.invoice');
|
||||
|
||||
Route::get('unsubscribe/{entity}/{invitation_key}', [App\Http\Controllers\ClientPortal\InvitationController::class, 'unsubscribe'])->name('unsubscribe');
|
||||
|
||||
});
|
||||
|
||||
Route::get('phantom/{entity}/{invitation_key}', [Phantom::class, 'displayInvitation'])->middleware(['invite_db', 'phantom_secret'])->name('phantom_view');
|
||||
|
||||
Route::fallback([BaseController::class, 'notFoundClient']);
|
||||
|
@ -1,54 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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!
|
||||
|
|
||||
*/
|
||||
use App\Http\Controllers\Auth\VendorContactLoginController;
|
||||
use App\Http\Controllers\VendorPortal\InvitationController;
|
||||
use App\Http\Controllers\VendorPortal\PurchaseOrderController;
|
||||
use App\Http\Controllers\VendorPortal\UploadController;
|
||||
use App\Http\Controllers\VendorPortal\VendorContactController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('vendors', [VendorContactLoginController::class, 'catch'])->name('vendor.catchall')->middleware(['domain_db', 'contact_account','vendor_locale']); //catch all
|
||||
|
||||
Route::group(['middleware' => ['invite_db'], 'prefix' => 'vendor', 'as' => 'vendor.'], function () {
|
||||
/*Invitation catches*/
|
||||
Route::get('purchase_order/{invitation_key}', [InvitationController::class, 'purchaseOrder']);
|
||||
Route::get('purchase_order/{invitation_key}/download', [InvitationController::class, 'download']);
|
||||
|
||||
// Route::get('purchase_order/{invitation_key}/download_pdf', 'PurchaseOrderController@downloadPdf')->name('recurring_invoice.download_invitation_key');
|
||||
// Route::get('purchase_order/{invitation_key}/download', 'ClientPortal\InvitationController@routerForDownload');
|
||||
|
||||
});
|
||||
|
||||
|
||||
Route::group(['middleware' => ['auth:vendor', 'vendor_locale', 'domain_db'], 'prefix' => 'vendor', 'as' => 'vendor.'], function () {
|
||||
|
||||
Route::get('dashboard', [PurchaseOrderController::class, 'index'])->name('dashboard');
|
||||
Route::get('purchase_orders', [PurchaseOrderController::class, 'index'])->name('purchase_orders.index');
|
||||
Route::get('purchase_orders/{purchase_order}', [PurchaseOrderController::class, 'show'])->name('purchase_order.show');
|
||||
|
||||
Route::get('profile/{vendor_contact}/edit', [VendorContactController::class, 'edit'])->name('profile.edit');
|
||||
Route::put('profile/{vendor_contact}/edit', [VendorContactController::class, 'update'])->name('profile.update');
|
||||
|
||||
Route::post('purchase_orders/bulk', [PurchaseOrderController::class, 'bulk'])->name('purchase_orders.bulk');
|
||||
Route::get('logout', [VendorContactLoginController::class, 'logout'])->name('logout');
|
||||
Route::post('purchase_order/upload/{purchase_order}', [UploadController::class,'upload'])->name('upload.store');
|
||||
|
||||
Route::post('documents/download_multiple', [App\Http\Controllers\VendorPortal\DocumentController::class, 'downloadMultiple'])->name('documents.download_multiple');
|
||||
Route::get('documents/{document}/download', [App\Http\Controllers\VendorPortal\DocumentController::class, 'download'])->name('documents.download');
|
||||
Route::resource('documents', App\Http\Controllers\VendorPortal\DocumentController::class)->only(['index', 'show']);
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Route::fallback('BaseController@notFoundVendor');
|
Loading…
Reference in New Issue
Block a user