diff --git a/composer.json b/composer.json index 1c4cca9..2731a8a 100644 --- a/composer.json +++ b/composer.json @@ -9,6 +9,7 @@ "license": "MIT", "require": { "php": "^8.2", + "ext-openssl": "*", "ext-pcntl": "*", "ext-posix": "*", "ext-zip": "^1.19", @@ -26,10 +27,10 @@ "php-mqtt/laravel-client": "^1.1", "pusher/pusher-php-server": "^7.2", "simplesoftwareio/simple-qrcode": "^4.2", + "spatie/laravel-tags": "^4.3", "spiral/roadrunner": "^2.8.2", "symfony/psr-http-message-bridge": "^2.1", - "yansongda/laravel-pay": "~3.2.0", - "ext-openssl": "*" + "yansongda/laravel-pay": "~3.2.0" }, "require-dev": { "beyondcode/laravel-query-detector": "^1.6", diff --git a/composer.lock b/composer.lock index efb7da8..e88c240 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5d44bd2dcba750e9a8d5ff2f9b4ad5cd", + "content-hash": "7c99675aa9c4e7f1a4390b44b27bdc1f", "packages": [ { "name": "bacon/bacon-qr-code", @@ -4832,6 +4832,313 @@ }, "time": "2021-02-08T20:43:55+00:00" }, + { + "name": "spatie/eloquent-sortable", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/eloquent-sortable.git", + "reference": "64a3365c0d5a7b4a1837b2f29d01ee4c578c416a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/eloquent-sortable/zipball/64a3365c0d5a7b4a1837b2f29d01ee4c578c416a", + "reference": "64a3365c0d5a7b4a1837b2f29d01ee4c578c416a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/database": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.9" + }, + "require-dev": { + "orchestra/testbench": "^6.0|^7.0", + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\EloquentSortable\\EloquentSortableServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Spatie\\EloquentSortable\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be" + } + ], + "description": "Sortable behaviour for eloquent models", + "homepage": "https://github.com/spatie/eloquent-sortable", + "keywords": [ + "behaviour", + "eloquent", + "laravel", + "model", + "sort", + "sortable" + ], + "support": { + "issues": "https://github.com/spatie/eloquent-sortable/issues", + "source": "https://github.com/spatie/eloquent-sortable/tree/4.0.1" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-01-21T08:32:41+00:00" + }, + { + "name": "spatie/laravel-package-tools", + "version": "1.14.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-package-tools.git", + "reference": "9964e65c318c30577ca1b91469f739d2b381359b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/9964e65c318c30577ca1b91469f739d2b381359b", + "reference": "9964e65c318c30577ca1b91469f739d2b381359b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/contracts": "^9.28|^10.0", + "php": "^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.5", + "orchestra/testbench": "^7.7|^8.0", + "pestphp/pest": "^1.22", + "phpunit/phpunit": "^9.5.24", + "spatie/pest-plugin-test-time": "^1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\LaravelPackageTools\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "role": "Developer" + } + ], + "description": "Tools for creating Laravel packages", + "homepage": "https://github.com/spatie/laravel-package-tools", + "keywords": [ + "laravel-package-tools", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-package-tools/issues", + "source": "https://github.com/spatie/laravel-package-tools/tree/1.14.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-01-10T14:09:55+00:00" + }, + { + "name": "spatie/laravel-tags", + "version": "4.3.5", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-tags.git", + "reference": "0f6b46f8af83dd9dac4df55f57009fd51d884d1c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-tags/zipball/0f6b46f8af83dd9dac4df55f57009fd51d884d1c", + "reference": "0f6b46f8af83dd9dac4df55f57009fd51d884d1c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "laravel/framework": "^8.67|^9.0", + "php": "^8.0", + "spatie/eloquent-sortable": "^3.10|^4.0", + "spatie/laravel-package-tools": "^1.4", + "spatie/laravel-translatable": "^4.6|^5.0|^6.0" + }, + "require-dev": { + "orchestra/testbench": "^6.13|^7.0", + "pestphp/pest": "^1.22", + "phpunit/phpunit": "^9.5.2" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\Tags\\TagsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Spatie\\Tags\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Add tags and taggable behaviour to your Laravel app", + "homepage": "https://github.com/spatie/laravel-tags", + "keywords": [ + "laravel-tags", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-tags/issues", + "source": "https://github.com/spatie/laravel-tags/tree/4.3.5" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-11-19T20:16:17+00:00" + }, + { + "name": "spatie/laravel-translatable", + "version": "6.3.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-translatable.git", + "reference": "b3f6fa43ce05d7640ca9eacf4fee9c0037fc84d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-translatable/zipball/b3f6fa43ce05d7640ca9eacf4fee9c0037fc84d2", + "reference": "b3f6fa43ce05d7640ca9eacf4fee9c0037fc84d2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "illuminate/database": "^9.0|^10.0", + "illuminate/support": "^9.0|^10.0", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.11" + }, + "require-dev": { + "mockery/mockery": "^1.4", + "orchestra/testbench": "^7.0|^8.0", + "pestphp/pest": "^1.20" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\Translatable\\TranslatableServiceProvider" + ] + }, + "aliases": { + "Translatable": "Spatie\\Translatable\\Facades\\Translatable" + } + }, + "autoload": { + "psr-4": { + "Spatie\\Translatable\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + }, + { + "name": "Sebastian De Deyne", + "email": "sebastian@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "A trait to make an Eloquent model hold translations", + "homepage": "https://github.com/spatie/laravel-translatable", + "keywords": [ + "eloquent", + "i8n", + "laravel-translatable", + "model", + "multilingual", + "spatie", + "translate" + ], + "support": { + "source": "https://github.com/spatie/laravel-translatable/tree/6.3.0" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-01-14T20:57:45+00:00" + }, { "name": "spiral/core", "version": "3.5.0", @@ -11526,6 +11833,7 @@ "prefer-lowest": false, "platform": { "php": "^8.2", + "ext-openssl": "*", "ext-pcntl": "*", "ext-posix": "*", "ext-zip": "^1.19" diff --git a/database/migrations/2023_01_17_010152_create_tag_tables.php b/database/migrations/2023_01_17_010152_create_tag_tables.php new file mode 100644 index 0000000..b96036b --- /dev/null +++ b/database/migrations/2023_01_17_010152_create_tag_tables.php @@ -0,0 +1,30 @@ +id(); + + $table->json('name'); + $table->json('slug'); + $table->string('type')->nullable(); + $table->integer('order_column')->nullable(); + + $table->timestamps(); + }); + + Schema::create('taggables', function (Blueprint $table) { + $table->foreignId('tag_id')->constrained()->cascadeOnDelete(); + + $table->morphs('taggable'); + + $table->unique(['tag_id', 'taggable_id', 'taggable_type']); + }); + } +}