Add Login & Register
This commit is contained in:
0
Modules/Linksehat/Routes/.gitkeep
Normal file
0
Modules/Linksehat/Routes/.gitkeep
Normal file
23
Modules/Linksehat/Routes/api.php
Normal file
23
Modules/Linksehat/Routes/api.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Modules\Linksehat\Http\Controllers\Api\AuthController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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::post('otp-request', [AuthController::class, 'otpRequest']);
|
||||
Route::post('login', [AuthController::class, 'login']);
|
||||
Route::post('register', [AuthController::class, 'register']);
|
||||
|
||||
Route::middleware('auth:api')->get('/linksehat', function (Request $request) {
|
||||
return $request->user();
|
||||
});
|
||||
16
Modules/Linksehat/Routes/web.php
Normal file
16
Modules/Linksehat/Routes/web.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::prefix('linksehat')->group(function() {
|
||||
Route::get('/', 'LinksehatController@index');
|
||||
});
|
||||
Reference in New Issue
Block a user