mirror of
https://github.com/henry4682/finance_app.git
synced 2026-07-16 08:20:00 +00:00
20 lines
357 B
PHP
20 lines
357 B
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\Category;
|
|
use App\Models\User;
|
|
|
|
class CategoryPolicy
|
|
{
|
|
|
|
public function update(User $user, Category $category): bool
|
|
{
|
|
return $user->id === $category->user_id;
|
|
}
|
|
|
|
public function delete(User $user, Category $category): bool
|
|
{
|
|
return $user->id === $category->user_id;
|
|
}
|
|
} |