[WIP] Setup of skeleton

This commit is contained in:
Ludovic CANDELLIER
2020-03-25 00:08:27 +01:00
parent baf8e13c25
commit 36267139a1
377 changed files with 18248 additions and 26 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Models\Auth;
use Illuminate\Database\Eloquent\Model;
class PermissionRole extends Model
{
protected $table = 'permission_role';
public function permission()
{
return $this->belongsTo('App\Permission');
}
public function role()
{
return $this->belongsTo('App\Role');
}
public function scopeByPermission($query, $id)
{
return $query->where('permission_id', $id);
}
public function scopeByRole($query, $id)
{
return $query->where('role_id', $id);
}
}