cleaning day
This commit is contained in:
@@ -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' => '']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user