17 lines
588 B
PHP
17 lines
588 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use Modules\Stylist\Http\Controllers\ThemeAssetController;
|
|
|
|
/*
|
|
| Public theme assets
|
|
| --------------------------------------------------------------------------
|
|
| Themes are stored beneath resources/themes, which is not web-accessible.
|
|
| This route safely streams allow-listed assets through Laravel at the URL
|
|
| expected by generated themes: /themes/{theme}/{path}.
|
|
*/
|
|
Route::get('/themes/{theme}/{path}', ThemeAssetController::class)
|
|
->where('theme', '[A-Za-z0-9_-]+')
|
|
->where('path', '.*')
|
|
->name('stylist.theme.asset');
|