Alnuaimi
How to create custom column for display widget in table?
I solved it ,
the bug is
Uncaught ReferenceError: externalTooltipHandler is not defined
tooltip: {
enabled: false,\
external: externalTooltipHandler
}
the solution is: remove external: externalTooltipHandler
12 replies
Filament configuration in Laravel Cloud
<?php
namespace App\Models;
use Filament\Models\Contracts\FilamentUser;
use Filament\Panel;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements FilamentUser
{
// ...
public function canAccessPanel(Panel $panel): bool
{
return true;
}
}
3 replies
Multi tenancy with multiple database support
yes ,this is important but before how to fix with local disk
this is middleware
for public
you can look
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Request;
use Closure;
class FileUrlMiddleware
{
public function handle(Request $request, Closure $next)
{
config()->set(
'filesystems.disks.public.url',
url('/' . config('tenancy.filesystem.suffix_base') . tenant('id'))
);
return $next($request); } }
return $next($request); } }
71 replies
Multi tenancy with multiple database support
Thank you for your comment! I understand that you're suggesting using
Authenticate
for user verification and Policy
for permission checks. In my case, the issue isn't with authentication or permissions, but rather with how to display files stored on the local disk (local
disk) in the form.
I’m using a Multi-Tenancy system, and the files are being stored correctly in each tenant's designated folders. However, when trying to display the file in the form, it doesn’t show up properly. I believe the issue might be with the file paths or how they’re being accessed.
If you have any experience dealing with such cases, I’d be grateful to hear your suggestions! 😊71 replies
private image with TenancyForLaravel
Step 1: Add the following code in the AppServiceProvider boot method.
Storage::disk('local')->buildTemporaryUrlsUsing(function ($path, $expiration, $options) {
return URL::temporarySignedRoute(
'local.temp',
$expiration,
array_merge($options, ['path' => $path])
);
});
Notice that URL::temporarySignedRoute receives route name local.temp, which we need to define.
Step 2: Add the route in web.php
Route::get('local/temp/{path}', function (string $path){
return Storage::disk('local')->download($path);
})->name('local.temp');
I did it ,but not work
22 replies
private image with TenancyForLaravel
https://tenant1.mydomain.com/tenant/54/01JPSG2S5D4PC4XM5XGBYARVPJ.png
any one can access this image
22 replies