diff --git a/src/Listeners/CompletedCartonBox.php b/src/Listeners/CompletedCartonBox.php index ad91ed0..de0135d 100644 --- a/src/Listeners/CompletedCartonBox.php +++ b/src/Listeners/CompletedCartonBox.php @@ -4,7 +4,6 @@ use Carbon\Carbon; use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Log; use Teresa\CartonBoxGuard\Events\PolybagCreated; use Teresa\CartonBoxGuard\Models\CartonBox; diff --git a/src/Models/CartonBox.php b/src/Models/CartonBox.php index e402b0f..05c3482 100644 --- a/src/Models/CartonBox.php +++ b/src/Models/CartonBox.php @@ -7,14 +7,15 @@ use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Support\Facades\Auth; -use Teresa\CartonBoxGuard\Traits\HasStringId; use Sfolador\Locked\Traits\HasLocks; +use Teresa\CartonBoxGuard\Traits\HasStringId; class CartonBox extends Model { + use HasLocks; use HasStringId; use SoftDeletes; - use HasLocks; + protected $primary = 'id'; protected $keyType = 'string'; @@ -32,11 +33,11 @@ public function prefixable(): array public function __construct(array $attributes = []) { - if (!isset($this->connection)) { + if (! isset($this->connection)) { $this->setConnection(config('carton-box-guard.database_connection')); } - if (!isset($this->table)) { + if (! isset($this->table)) { $this->setTable(config('carton-box-guard.carton.table_name')); }