forked from eatvio/eatvio-infra
41 lines
1.7 KiB
PHP
41 lines
1.7 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\Mobile\MobileProfileController;
|
|
use App\Http\Controllers\Mobile\MobileRegisterController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
/*
|
|
* |--------------------------------------------------------------------------
|
|
* | 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!
|
|
* |
|
|
*/
|
|
|
|
Route::group([
|
|
[
|
|
// 'namespace' => 'App\Http\Controllers\Mobile',
|
|
],
|
|
], static function (): void {
|
|
Route::post('/register', [MobileRegisterController::class, 'register'])->name('register');
|
|
Route::post('/login', [MobileRegisterController::class, 'login'])->name('login');
|
|
Route::group([
|
|
'middleware' => ['auth:sanctum'],
|
|
'prefix' => 'profile',
|
|
], static function () {
|
|
Route::get('/index', [MobileProfileController::class, 'index']);
|
|
Route::post('/addWeight', [MobileProfileController::class, 'addWeight']);
|
|
Route::post('/addCircumference', [MobileProfileController::class, 'addCircumference']);
|
|
});
|
|
});
|
|
|
|
// Route::post('/register', [MobileRegisterController::class, 'register']);
|
|
// Route::post('/login', [MobileRegisterController::class, 'login']);
|
|
|
|
// Route::middleware('auth:sanctum')->get('/profile/index', [MobileProfileController::class, 'index']);
|
|
// Route::middleware('auth:sanctum')->post('/profile/addWeight', [MobileProfileController::class, 'addWeight']);
|
|
// Route::middleware('auth:sanctum')->post('/profile/addCircumference', [MobileProfileController::class, 'addCircumference']);
|