1
0
Fork 0
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:
Samuel Štancl 2019-01-20 14:52:14 +01:00
parent 25bc3f81b3
commit 3a6ceed992
4 changed files with 38 additions and 1 deletions

View 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);
}
}
}