Skip to content

Instantly share code, notes, and snippets.

View lucacastelnuovo's full-sized avatar
:octocat:

Luca Castelnuovo lucacastelnuovo

:octocat:
View GitHub Profile
<?php
namespace App\Filament\AppPanel\Pages\Tenancy;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Pages\Tenancy\EditTenantProfile as BaseEditTenantProfile;
class EditTenantProfile extends BaseEditTenantProfile
{
<?php
namespace App\Providers\Filament;
use App\Filament\AppPanel\Pages\Tenancy\EditTenantProfile;
use App\Filament\Pages\Auth\Login;
use App\Models\Tenant;
use Filament\Http\Middleware\Authenticate;
use Filament\Http\Middleware\DisableBladeIconComponents;
use Filament\Http\Middleware\DispatchServingFilamentEvent;
@lucacastelnuovo
lucacastelnuovo / HasRoles.php
Created July 28, 2023 21:38
Filament V3 multi-tenancy & laravel-permission role helper
<?php
namespace App\Models\Support;
use App\Models\Tenant;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Spatie\Permission\Traits\HasRoles as SpatieHasRoles;
trait HasRoles
{
@lucacastelnuovo
lucacastelnuovo / EncryptedS3Adapter.php
Created November 30, 2022 15:53
!!! THIS DOES NOT WORK !!!
<?php
namespace App\Adapters;
use League\Flysystem\Config;
use League\Flysystem\AwsS3V3\AwsS3V3Adapter;
class EncryptedS3Adapter extends AwsS3V3Adapter
{
public function write(string $path, string $contents, Config $config): void