32 lines
1.2 KiB
PHP
32 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use App\Http\Controllers\Api\WorkerAuthController;
|
|
use App\Http\Controllers\Api\WorkerProfileController;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| API Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register API routes for your mobile app. These
|
|
| routes are loaded by bootstrap/app.php and are automatically prefixed
|
|
| with "api/" and assigned the stateless api middleware.
|
|
|
|
|
*/
|
|
|
|
// Unprotected Worker Mobile Auth Endpoints
|
|
Route::post('/workers/register', [WorkerAuthController::class, 'register']);
|
|
Route::post('/workers/login', [WorkerAuthController::class, 'login']);
|
|
|
|
// Protected Worker Mobile Endpoints (Token Authenticated via Bearer Token)
|
|
Route::middleware(['auth.worker'])->group(function () {
|
|
// Profile Management
|
|
Route::get('/workers/profile', [WorkerProfileController::class, 'getProfile']);
|
|
Route::post('/workers/profile/update', [WorkerProfileController::class, 'updateProfile']);
|
|
|
|
// Job Offers Management
|
|
Route::get('/workers/offers', [WorkerProfileController::class, 'getOffers']);
|
|
Route::post('/workers/offers/{id}/respond', [WorkerProfileController::class, 'respondToOffer']);
|
|
});
|