Files
technical-services-exchange/routes/web.php
T
2026-07-10 12:14:55 -05:00

87 lines
4.9 KiB
PHP

<?php
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\AdminController;
use App\Http\Controllers\AttachmentController;
use App\Http\Controllers\BuyerProfileController;
use App\Http\Controllers\CommentController;
use App\Http\Controllers\DisputeController;
use App\Http\Controllers\DisputeVoteController;
use App\Http\Controllers\ExternalProfileImportController;
use App\Http\Controllers\JobPostController;
use App\Http\Controllers\NotificationController;
use App\Http\Controllers\ProviderProfileController;
use App\Http\Controllers\QuoteController;
use App\Http\Controllers\RatingController;
use App\Http\Controllers\ReviewController;
use App\Http\Controllers\SocialPostController;
use App\Http\Controllers\WorkOrderMessageController;
use App\Http\Controllers\WorkOrderController;
use Illuminate\Support\Facades\Route;
$basePath = trim((string) config('app.base_path', ''), '/');
Route::prefix($basePath)->group(function (): void {
Route::get('/', function () {
return view('welcome');
});
Route::get('/terms', function () {
return view('terms');
})->name('terms');
Route::get('/dashboard', function () {
return view('dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
Route::get('/provider-profile', [ProviderProfileController::class, 'edit'])->name('providers.edit');
Route::put('/provider-profile', [ProviderProfileController::class, 'update'])->name('providers.update');
Route::post('/provider-profile/imports', [ExternalProfileImportController::class, 'store'])->name('provider-imports.store');
Route::get('/buyer-profile', [BuyerProfileController::class, 'edit'])->name('buyers.edit');
Route::put('/buyer-profile', [BuyerProfileController::class, 'update'])->name('buyers.update');
Route::post('/feed', [SocialPostController::class, 'store'])->name('feed.store');
Route::post('/comments', [CommentController::class, 'store'])->name('comments.store');
Route::post('/attachments', [AttachmentController::class, 'store'])->name('attachments.store');
Route::post('/ratings', [RatingController::class, 'store'])->name('ratings.store');
Route::get('/notifications', [NotificationController::class, 'index'])->name('notifications.index');
Route::post('/notifications/read-all', [NotificationController::class, 'markAllRead'])->name('notifications.read-all');
Route::post('/notifications/{id}/read', [NotificationController::class, 'markRead'])->name('notifications.read');
Route::get('/jobs/create', [JobPostController::class, 'create'])->name('jobs.create');
Route::post('/jobs', [JobPostController::class, 'store'])->name('jobs.store');
Route::post('/jobs/{job}/quotes', [QuoteController::class, 'store'])->name('quotes.store');
Route::patch('/quotes/{quote}', [QuoteController::class, 'update'])->name('quotes.update');
Route::post('/quotes/{quote}/accept', [QuoteController::class, 'accept'])->name('quotes.accept');
Route::post('/quotes/{quote}/decline', [QuoteController::class, 'decline'])->name('quotes.decline');
Route::get('/work-orders', [WorkOrderController::class, 'index'])->name('work-orders.index');
Route::get('/work-orders/{workOrder}', [WorkOrderController::class, 'show'])->name('work-orders.show');
Route::patch('/work-orders/{workOrder}/transition', [WorkOrderController::class, 'transition'])->name('work-orders.transition');
Route::post('/work-orders/{workOrder}/messages', [WorkOrderMessageController::class, 'store'])->name('work-order-messages.store');
Route::post('/work-orders/{workOrder}/reviews', [ReviewController::class, 'store'])->name('reviews.store');
Route::post('/work-orders/{workOrder}/disputes', [DisputeController::class, 'store'])->name('disputes.store');
Route::get('/disputes/{dispute}', [DisputeController::class, 'show'])->name('disputes.show');
Route::post('/disputes/{dispute}/votes', [DisputeVoteController::class, 'store'])->name('dispute-votes.store');
Route::get('/admin', [AdminController::class, 'index'])->name('admin.index');
});
Route::get('/providers', [ProviderProfileController::class, 'index'])->name('providers.index');
Route::get('/providers/{provider}', [ProviderProfileController::class, 'show'])->name('providers.show');
Route::get('/buyers', [BuyerProfileController::class, 'index'])->name('buyers.index');
Route::get('/buyers/{buyer}', [BuyerProfileController::class, 'show'])->name('buyers.show');
Route::get('/feed', [SocialPostController::class, 'index'])->name('feed.index');
Route::get('/jobs', [JobPostController::class, 'index'])->name('jobs.index');
Route::get('/jobs/{job}', [JobPostController::class, 'show'])->name('jobs.show');
require __DIR__.'/auth.php';
});