add shipping rules
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Models\Core;
|
||||
|
||||
use App\Traits\Model\HasComments;
|
||||
use Exception;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Traits\Model\HasComments;
|
||||
|
||||
class Comment extends Model
|
||||
{
|
||||
@@ -13,7 +13,7 @@ class Comment extends Model
|
||||
protected $guarded = [];
|
||||
|
||||
protected $casts = [
|
||||
'is_approved' => 'boolean'
|
||||
'is_approved' => 'boolean',
|
||||
];
|
||||
|
||||
public function scopeApproved($query)
|
||||
@@ -39,7 +39,7 @@ class Comment extends Model
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function disapprove()
|
||||
{
|
||||
$this->update([
|
||||
@@ -55,11 +55,10 @@ class Comment extends Model
|
||||
return config('comments.user_model');
|
||||
}
|
||||
|
||||
if (!is_null(config('auth.providers.users.model'))) {
|
||||
if (! is_null(config('auth.providers.users.model'))) {
|
||||
return config('auth.providers.users.model');
|
||||
}
|
||||
|
||||
throw new Exception('Could not determine the commentator model name.');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user