This commit is contained in:
Lizandro Guarnizo
2026-01-06 15:35:59 -05:00
commit a768146f65
602 changed files with 42505 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Spatie\Permission\Traits\HasRoles;
class Permission extends Model
{
use HasFactory, HasRoles;
protected $fillable = ['name', 'guard_name'];
protected $attributes = [
'guard_name' => 'web', // Establece el valor predeterminado
];
public function roles()
{
return $this->belongsToMany(Role::class, 'role_has_permissions');
}
}