diff --git a/composer.json b/composer.json index 5360f24..8664086 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,9 @@ ], "require": { "php": "^8.1 | ^8.2 | ^8.3", - "spatie/laravel-package-tools": "^1.14.0", - "illuminate/contracts": "^9.0 | ^10.0 | ^11.0" + "cleaniquecoders/traitify": "^1.0", + "illuminate/contracts": "^9.0 | ^10.0 | ^11.0", + "spatie/laravel-package-tools": "^1.14.0" }, "require-dev": { "laravel/pint": "^1.0", diff --git a/src/Concerns/InteractsWithUuid.php b/src/Concerns/InteractsWithUuid.php deleted file mode 100644 index 330f1c2..0000000 --- a/src/Concerns/InteractsWithUuid.php +++ /dev/null @@ -1,46 +0,0 @@ -getTable(), $model->getUuidColumnName()) && is_null($model->{$model->getUuidColumnName()})) { - $model->{$model->getUuidColumnName()} = Str::orderedUuid(); - } - }); - } - - /** - * Get the route key for the model. - * - * @return string - */ - public function getRouteKeyName() - { - return $this->getUuidColumnName(); - } - - /** - * Get UUID Column Name. - */ - public function getUuidColumnName(): string - { - return isset($this->uuid_column) ? $this->uuid_column : 'uuid'; - } - - /** - * Scope a query to only include popular users. - */ - public function scopeUuid(Builder $query, $value): Builder - { - return $query->where($this->getUuidColumnName(), $value); - } -} diff --git a/src/Models/MailHistory.php b/src/Models/MailHistory.php index a6b6e7b..1b1bfbf 100644 --- a/src/Models/MailHistory.php +++ b/src/Models/MailHistory.php @@ -3,7 +3,7 @@ namespace CleaniqueCoders\MailHistory\Models; use CleaniqueCoders\MailHistory\Concerns\InteractsWithHash; -use CleaniqueCoders\MailHistory\Concerns\InteractsWithUuid; +use CleaniqueCoders\Traitify\Concerns\InteractsWithUuid; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model;