feat: deep link added

This commit is contained in:
2026-09-02 10:30:02 +03:30
parent 3f3b5b1d69
commit a3cda12560
9 changed files with 256 additions and 11 deletions
+6
View File
@@ -52,6 +52,12 @@
Route::get('package-names/{name}/products', [ProductController::class, 'index']);
// Public deep links — allow hidden (is_deeplink_only) media/categories to be
// fetched without authentication when reached via their share link.
Route::get('public/media/{id}', [MediaController::class, 'publicShow']);
Route::get('public/categories/{id}', [CategoryController::class, 'publicShow']);
Route::prefix('auth')->controller(UserController::class)->group(function () {
Route::post('login-with-approo-v2', [UserController::class, 'loginV2']);
Route::middleware(['throttle:3,1'])->post('login-otp', 'loginOTP');
+7
View File
@@ -1,7 +1,14 @@
<?php
use App\Http\Controllers\CategoryController;
use App\Http\Controllers\MediaController;
use Illuminate\Support\Facades\Route;
Route::get('/', function () {
return view('welcome');
});
// Canonical deep links (e.g. https://aramejan.com/media/3). Served as JSON so
// the mobile app / web can fetch the hidden item reached through the deep link.
Route::get('/media/{id}', [MediaController::class, 'publicShow']);
Route::get('/category/{id}', [CategoryController::class, 'publicShow']);