refactor: kb & station & terminal

This commit is contained in:
2026-03-23 20:17:17 +08:00
parent 63ea2686e1
commit b74ba1a3f8
81 changed files with 1016 additions and 2492 deletions

View File

@@ -0,0 +1,39 @@
<?php
namespace App\Policies;
use App\Models\Station;
use App\Models\User;
class StationPolicy
{
public function viewAny(User $user): bool
{
return $user->can('station.view');
}
public function view(User $user, Station $station): bool
{
return $user->can('station.view');
}
public function create(User $user): bool
{
return $user->can('station.create');
}
public function update(User $user, Station $station): bool
{
return $user->can('station.update');
}
public function delete(User $user, Station $station): bool
{
return $user->can('station.delete');
}
public function deleteAny(User $user): bool
{
return $user->can('station.delete');
}
}