Add built-in screens (login, profile, menu, posts), per-user and site themes
This commit is contained in:
1 parent
4bf0a8bbb0
commit
351667abaf
46 files changed
+3720
-12
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace IriksIT\Manager\Http\Controllers;
|
||||
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
|
||||
/** The built screens, served by the package itself: the app does not need Node, a build step or a publish. */
|
||||
class AssetController
|
||||
{
|
||||
private const FILES = ['manager.js' => 'application/javascript', 'manager.css' => 'text/css'];
|
||||
|
||||
public function __invoke(string $file): BinaryFileResponse
|
||||
{
|
||||
abort_unless(isset(self::FILES[$file]) && is_file($path = __DIR__.'/../../../resources/dist/'.$file), 404);
|
||||
|
||||
return response()->file($path, [
|
||||
'Content-Type' => self::FILES[$file],
|
||||
'Cache-Control' => 'public, max-age=31536000, immutable',
|
||||
'X-Content-Type-Options' => 'nosniff',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user