Files
postshop-backend/app/Models/Concerns/InteractsWithNova.php
2026-02-03 15:31:29 +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;
}
}