cleaning day

This commit is contained in:
ludo
2024-02-22 21:28:33 +01:00
parent 00fc978217
commit 3acb69abe4
111 changed files with 198 additions and 2456 deletions

View File

@@ -9,14 +9,4 @@ class Permission extends parentPermission
protected $connection = 'mysql';
protected $guarded = ['id'];
public function application()
{
return $this->belongsTo(\App\Models\Core\App\Application::class)->withDefault(['name' => '']);
}
public function application_module()
{
return $this->belongsTo(\App\Models\Core\App\ApplicationModule::class)->withDefault(['name' => '']);
}
}

View File

@@ -2,7 +2,7 @@
namespace App\Models\Core\Auth;
use Sebastienheyd\Boilerplate\Models\permissionCategory as parentPermissionCategory;
use Sebastienheyd\Boilerplate\Models\PermissionCategory as parentPermissionCategory;
class PermissionCategory extends parentPermissionCategory
{

View File

@@ -5,6 +5,8 @@ namespace App\Models\Core;
use App\Traits\Model\HasComments;
use Exception;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo;
class Comment extends Model
{
@@ -21,12 +23,12 @@ class Comment extends Model
return $query->where('is_approved', true);
}
public function commentable()
public function commentable(): MorphTo
{
return $this->morphTo();
}
public function commentator()
public function commentator(): BelongsTo
{
return $this->belongsTo($this->getAuthModelName(), 'user_id');
}