Files
suivicpt/app/Policies/HouseholdPolicy.php
T
jeremy bayseandClaude Sonnet 5 d8dc57a5df Initial commit: SuiviCPT personal finance tracker
Laravel 11 + Livewire 3/Volt + Alpine.js + Tailwind app for household
budget planning, transaction tracking, and financial dashboards.

- Multi-tenant households with member invites
- Plan: monthly/yearly budget per category with overrides
- Suivi: transaction log with running balance (desktop + mobile quick-entry)
- Dashboard: budget vs tracked breakdown + Chart.js donuts
- Flux: Sankey diagram of income allocation
- WCAG 2.1 AA color tokens, dark mode, accessible tables/forms
- 50 Pest tests

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 22:39:42 +02:00

25 lines
502 B
PHP

<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\Household;
use App\Models\User;
class HouseholdPolicy
{
public function view(User $user, Household $household): bool
{
return $household->members()->whereKey($user->id)->exists();
}
public function manageMembers(User $user, Household $household): bool
{
return $household->members()
->whereKey($user->id)
->wherePivot('role', 'owner')
->exists();
}
}