Files
backend-mm/app/Models/Concerns/InteractsWithNova.php
2025-09-25 03:03:31 +05:00

27 lines
449 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'])) {
return true;
}
if ($this->hasRole('vendor') && $this->channel()->id) {
return true;
}
return false;
}
}