File: /var/www/vaspayment.com/routes/api.php
<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AuthController;
use App\Http\Controllers\BlogController;
use App\Http\Controllers\Billers\MonnifyWebhookController;
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
return $request->user();
});
Route::prefix('v1')->group(
function () {
Route::post('/transfer-webhook', [MonnifyWebhookController::class, 'index']);
}
);
//for api
Route::prefix('v1')->group(
function () {
Route::get('/blogs', [BlogController::class, 'allBlog']);
}
);
Route::prefix('v1')->group(
function () {
Route::get('/blog-categories', [BlogController::class, 'allCategory']);
}
);
Route::prefix('v1')->group(
function () {
Route::post('/store-category', [BlogController::class, 'storeCat']);
}
);
Route::get('/get/data/plans', 'Api\DataPlanController@getPlans');
Route::controller(AuthController::class)->group(function () {
Route::get('login/google', 'redirectToGoogle')->name('login.google');
Route::get('/google/callback', 'handleGoogleCallback')->name('handleGoogleCallback');
});