mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 23:34:03 +00:00
26 lines
556 B
PHP
26 lines
556 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Stancl\Tenancy\Controllers;
|
|
|
|
use Illuminate\Routing\Controller;
|
|
|
|
class TenantAssetsController extends Controller
|
|
{
|
|
public static $tenancyMiddleware = 'Stancl\Tenancy\Middleware\InitializeTenancyByDomain';
|
|
|
|
public function __construct()
|
|
{
|
|
$this->middleware(static::$tenancyMiddleware);
|
|
}
|
|
|
|
public function asset($path)
|
|
{
|
|
try {
|
|
return response()->file(storage_path("app/public/$path"));
|
|
} catch (\Throwable $th) {
|
|
abort(404);
|
|
}
|
|
}
|
|
}
|