feat(mailbox): Implement cinematic UX and user tiers

- Added Spatie roles (free, pro, enterprise, admin) and access scopes
- Implemented delayed, cinematic mailbox provisioning animation
- Fixed GSAP and SVG collision issues on creation overlay
- Improved component sync with livewire refresh
- Added feature tests for tier systems and fixed RegistrationTest
This commit is contained in:
idevakk
2026-03-06 00:22:27 +05:30
parent 60b87a3609
commit 7dc89880a7
10 changed files with 497 additions and 62 deletions

View File

@@ -2,6 +2,7 @@
namespace Database\Factories;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
@@ -41,4 +42,24 @@ class UserFactory extends Factory
'email_verified_at' => null,
]);
}
public function free(): static
{
return $this->afterCreating(fn (User $user) => $user->assignRole('free'));
}
public function pro(): static
{
return $this->afterCreating(fn (User $user) => $user->assignRole('pro'));
}
public function enterprise(): static
{
return $this->afterCreating(fn (User $user) => $user->assignRole('enterprise'));
}
public function admin(): static
{
return $this->afterCreating(fn (User $user) => $user->assignRole('admin'));
}
}