mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:04:04 +00:00
Fix #7 - tenant assets
This commit is contained in:
parent
25bc3f81b3
commit
3a6ceed992
4 changed files with 38 additions and 1 deletions
23
src/Controllers/TenantAssetsController.php
Normal file
23
src/Controllers/TenantAssetsController.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace Stancl\Tenancy\Controllers;
|
||||
|
||||
use Illuminate\Routing\Controller;
|
||||
|
||||
class TenantAssetController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('tenancy');
|
||||
}
|
||||
|
||||
public function asset($path)
|
||||
{
|
||||
try {
|
||||
return response()->file(storage_path('app/public/' . $path));
|
||||
} catch (\Throwable $th) {
|
||||
dd(storage_path('app/public/' . $path));
|
||||
abort(404);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue