1. A route for requesting an asset file, for example: /static/xxx/9915995c-2952-490c-8e51-037a0950233c/assets/js/react.f886be.js
2. Because the asset_key contains /, and the Laravel routing component allows all characters except /, you must use a where condition with a regular expression to explicitly allow / to be part of the placeholder. Otherwise, the route will fall back. The routes/web.php file is used to define routes for the web interface.
Route::get('/static/xxx/{theme_id}/{asset_key}', 'ModelController@show')->where('asset_key', '.*');
3. Open https://regex101.com/ and confirm that the regular expression .* matches assets/js/react.f886be.js. See Figure 1.

4. The corresponding controller method is implemented as follows. To comply with the Last-Modified specification, DATE_RFC7231 is used, which is the RFC 7231 format (example: Sat, 30 Apr 2016 17:52:13 GMT). See Figure 2.

$model = Model::where('theme_id', '=', $themeId)->where('asset_key', '=', $assetKey)->where('category', '=', Model::CATEGORY_ASSET)->firstOrFail();
return response($model->content, 200)
->withHeaders([
'Content-Type' => $model->mime_type,
'Last-Modified' => date(DATE_RFC7231, strtotime($model->getOriginal('updated_at'))),
]);
