add shipping rules

This commit is contained in:
Ludovic CANDELLIER
2023-07-16 14:45:42 +02:00
parent 72a7b270f9
commit 0879b0abf0
459 changed files with 6219 additions and 5416 deletions

View File

@@ -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.');
}
}