Files
backend-mm/app/Models/Concerns/InteractsWithNova.php
Mekan1206 6c596c071a WIP
2026-08-15 13:02:40 +05:00

27 lines
461 B
PHP

<?php
namespace App\Models\Concerns;
trait InteractsWithNova
{
/**
* Check if user can access nova
*/
public function canAccessNova(): bool
{
if ($this->isMe()) {
return true;
}
if ($this->hasRole(['admin', 'manager', 'direktor'])) {
return true;
}
if ($this->hasRole('vendor') && $this->channel()->id) {
return true;
}
return false;
}
}