1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00
invoiceninja/routes/vendor.php

48 lines
2.4 KiB
PHP
Raw Normal View History

2022-06-05 01:47:33 +02:00
<?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!
|
*/
2022-06-14 14:18:20 +02:00
use App\Http\Controllers\Auth\VendorContactLoginController;
2022-06-13 11:59:24 +02:00
use App\Http\Controllers\VendorPortal\InvitationController;
use App\Http\Controllers\VendorPortal\PurchaseOrderController;
2022-06-15 13:24:30 +02:00
use App\Http\Controllers\VendorPortal\VendorContactController;
2022-06-13 11:59:24 +02:00
use Illuminate\Support\Facades\Route;
2022-06-05 01:47:33 +02:00
2022-06-14 14:54:31 +02:00
Route::get('vendors', [VendorContactLoginController::class, 'catch'])->name('vendor.catchall')->middleware(['domain_db', 'contact_account','vendor_locale']); //catch all
2022-06-14 14:18:20 +02:00
2022-06-13 11:59:24 +02:00
Route::group(['middleware' => ['invite_db'], 'prefix' => 'vendor', 'as' => 'vendor.'], function () {
/*Invitation catches*/
Route::get('purchase_order/{invitation_key}', [InvitationController::class, 'purchaseOrder']);
2022-06-29 03:42:17 +02:00
Route::get('purchase_order/{invitation_key}/download', [InvitationController::class, 'download']);
2022-06-13 11:59:24 +02:00
// 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');
2022-06-05 01:47:33 +02:00
2022-06-13 11:59:24 +02:00
});
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');
2022-06-15 13:24:30 +02:00
Route::get('profile/{vendor_contact}/edit', [VendorContactController::class, 'edit'])->name('profile.edit');
Route::put('profile/{vendor_contact}/edit', [VendorContactController::class, 'update'])->name('profile.update');
2022-06-15 07:20:00 +02:00
Route::post('purchase_orders/bulk', [PurchaseOrderController::class, 'bulk'])->name('purchase_orders.bulk');
2022-06-15 08:27:21 +02:00
Route::get('logout', [VendorContactLoginController::class, 'logout'])->name('logout');
2022-06-13 11:59:24 +02:00
2022-06-15 07:20:00 +02:00
});
2022-06-29 03:42:17 +02:00
2022-06-29 03:37:40 +02:00
2022-06-15 07:20:00 +02:00
Route::fallback('BaseController@notFoundVendor');