diff --git a/.gitignore b/.gitignore
index eb003b0..ad69c6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,15 +1,20 @@
+/.phpunit.cache
/node_modules
+/public/build
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
+.env.production
.phpunit.result.cache
docker-compose.override.yml
Homestead.json
Homestead.yaml
+auth.json
npm-debug.log
yarn-error.log
+/.fleet
/.idea
/.vscode
diff --git a/composer.json b/composer.json
index 255c34a..ac7b01b 100644
--- a/composer.json
+++ b/composer.json
@@ -9,7 +9,8 @@
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.0",
"laravel/sanctum": "^3.2",
- "laravel/tinker": "^2.8"
+ "laravel/tinker": "^2.8",
+ "spatie/laravel-medialibrary": "^10.0.0"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
diff --git a/composer.lock b/composer.lock
index f976a09..3ffebe9 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": "3cc103bb845e9d02d8758e54e8e63801",
+ "content-hash": "5986f4b511cd9b94b42fa514e7f64489",
"packages": [
{
"name": "brick/math",
@@ -980,6 +980,90 @@
],
"time": "2021-10-07T12:57:01+00:00"
},
+ {
+ "name": "intervention/image",
+ "version": "2.7.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Intervention/image.git",
+ "reference": "04be355f8d6734c826045d02a1079ad658322dad"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Intervention/image/zipball/04be355f8d6734c826045d02a1079ad658322dad",
+ "reference": "04be355f8d6734c826045d02a1079ad658322dad",
+ "shasum": ""
+ },
+ "require": {
+ "ext-fileinfo": "*",
+ "guzzlehttp/psr7": "~1.1 || ^2.0",
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "~0.9.2",
+ "phpunit/phpunit": "^4.8 || ^5.7 || ^7.5.15"
+ },
+ "suggest": {
+ "ext-gd": "to use GD library based image processing.",
+ "ext-imagick": "to use Imagick based image processing.",
+ "intervention/imagecache": "Caching extension for the Intervention Image library"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.4-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Intervention\\Image\\ImageServiceProvider"
+ ],
+ "aliases": {
+ "Image": "Intervention\\Image\\Facades\\Image"
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Intervention\\Image\\": "src/Intervention/Image"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Oliver Vogel",
+ "email": "oliver@intervention.io",
+ "homepage": "https://intervention.io/"
+ }
+ ],
+ "description": "Image handling and manipulation library with support for Laravel integration",
+ "homepage": "http://image.intervention.io/",
+ "keywords": [
+ "gd",
+ "image",
+ "imagick",
+ "laravel",
+ "thumbnail",
+ "watermark"
+ ],
+ "support": {
+ "issues": "https://github.com/Intervention/image/issues",
+ "source": "https://github.com/Intervention/image/tree/2.7.2"
+ },
+ "funding": [
+ {
+ "url": "https://paypal.me/interventionio",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/Intervention",
+ "type": "github"
+ }
+ ],
+ "time": "2022-05-21T17:30:32+00:00"
+ },
{
"name": "laravel/framework",
"version": "v10.0.3",
@@ -1652,6 +1736,71 @@
],
"time": "2023-02-18T15:32:41+00:00"
},
+ {
+ "name": "league/glide",
+ "version": "2.2.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/thephpleague/glide.git",
+ "reference": "446b1fc9f15101db52e8ddb7bec8cb16e814b244"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/thephpleague/glide/zipball/446b1fc9f15101db52e8ddb7bec8cb16e814b244",
+ "reference": "446b1fc9f15101db52e8ddb7bec8cb16e814b244",
+ "shasum": ""
+ },
+ "require": {
+ "intervention/image": "^2.7",
+ "league/flysystem": "^2.0|^3.0",
+ "php": "^7.2|^8.0",
+ "psr/http-message": "^1.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.3.3",
+ "phpunit/php-token-stream": "^3.1|^4.0",
+ "phpunit/phpunit": "^8.5|^9.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "League\\Glide\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Reinink",
+ "email": "jonathan@reinink.ca",
+ "homepage": "http://reinink.ca"
+ },
+ {
+ "name": "Titouan Galopin",
+ "email": "galopintitouan@gmail.com",
+ "homepage": "https://titouangalopin.com"
+ }
+ ],
+ "description": "Wonderfully easy on-demand image manipulation library with an HTTP based API.",
+ "homepage": "http://glide.thephpleague.com",
+ "keywords": [
+ "ImageMagick",
+ "editing",
+ "gd",
+ "image",
+ "imagick",
+ "league",
+ "manipulation",
+ "processing"
+ ],
+ "support": {
+ "issues": "https://github.com/thephpleague/glide/issues",
+ "source": "https://github.com/thephpleague/glide/tree/2.2.3"
+ },
+ "time": "2023-02-14T06:15:26+00:00"
+ },
{
"name": "league/mime-type-detection",
"version": "1.11.0",
@@ -1708,6 +1857,84 @@
],
"time": "2022-04-17T13:12:02+00:00"
},
+ {
+ "name": "maennchen/zipstream-php",
+ "version": "v2.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/maennchen/ZipStream-PHP.git",
+ "reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3",
+ "reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3",
+ "shasum": ""
+ },
+ "require": {
+ "ext-mbstring": "*",
+ "myclabs/php-enum": "^1.5",
+ "php": "^8.0",
+ "psr/http-message": "^1.0"
+ },
+ "require-dev": {
+ "ext-zip": "*",
+ "friendsofphp/php-cs-fixer": "^3.9",
+ "guzzlehttp/guzzle": "^6.5.3 || ^7.2.0",
+ "mikey179/vfsstream": "^1.6",
+ "php-coveralls/php-coveralls": "^2.4",
+ "phpunit/phpunit": "^8.5.8 || ^9.4.2",
+ "vimeo/psalm": "^5.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "ZipStream\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Paul Duncan",
+ "email": "pabs@pablotron.org"
+ },
+ {
+ "name": "Jonatan Männchen",
+ "email": "jonatan@maennchen.ch"
+ },
+ {
+ "name": "Jesse Donat",
+ "email": "donatj@gmail.com"
+ },
+ {
+ "name": "András Kolesár",
+ "email": "kolesar@kolesar.hu"
+ }
+ ],
+ "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
+ "keywords": [
+ "stream",
+ "zip"
+ ],
+ "support": {
+ "issues": "https://github.com/maennchen/ZipStream-PHP/issues",
+ "source": "https://github.com/maennchen/ZipStream-PHP/tree/v2.4.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/maennchen",
+ "type": "github"
+ },
+ {
+ "url": "https://opencollective.com/zipstream",
+ "type": "open_collective"
+ }
+ ],
+ "time": "2022-12-08T12:29:14+00:00"
+ },
{
"name": "monolog/monolog",
"version": "3.3.1",
@@ -1809,6 +2036,69 @@
],
"time": "2023-02-06T13:46:10+00:00"
},
+ {
+ "name": "myclabs/php-enum",
+ "version": "1.8.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/myclabs/php-enum.git",
+ "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483",
+ "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "php": "^7.3 || ^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.5",
+ "squizlabs/php_codesniffer": "1.*",
+ "vimeo/psalm": "^4.6.2"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "MyCLabs\\Enum\\": "src/"
+ },
+ "classmap": [
+ "stubs/Stringable.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP Enum contributors",
+ "homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
+ }
+ ],
+ "description": "PHP Enum implementation",
+ "homepage": "http://github.com/myclabs/php-enum",
+ "keywords": [
+ "enum"
+ ],
+ "support": {
+ "issues": "https://github.com/myclabs/php-enum/issues",
+ "source": "https://github.com/myclabs/php-enum/tree/1.8.4"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/mnapoli",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2022-08-04T09:53:51+00:00"
+ },
{
"name": "nesbot/carbon",
"version": "2.66.0",
@@ -2943,6 +3233,298 @@
],
"time": "2023-02-07T16:14:23+00:00"
},
+ {
+ "name": "spatie/image",
+ "version": "2.2.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/image.git",
+ "reference": "c78e2dbdbced9c1673800e5b813cc8a8127bc5ac"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/image/zipball/c78e2dbdbced9c1673800e5b813cc8a8127bc5ac",
+ "reference": "c78e2dbdbced9c1673800e5b813cc8a8127bc5ac",
+ "shasum": ""
+ },
+ "require": {
+ "ext-exif": "*",
+ "ext-json": "*",
+ "ext-mbstring": "*",
+ "league/glide": "^2.2.2",
+ "php": "^8.0",
+ "spatie/image-optimizer": "^1.1",
+ "spatie/temporary-directory": "^1.0|^2.0",
+ "symfony/process": "^3.0|^4.0|^5.0|^6.0"
+ },
+ "require-dev": {
+ "pestphp/pest": "^1.22",
+ "phpunit/phpunit": "^9.5",
+ "symfony/var-dumper": "^4.0|^5.0|^6.0",
+ "vimeo/psalm": "^4.6"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spatie\\Image\\": "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": "Manipulate images with an expressive API",
+ "homepage": "https://github.com/spatie/image",
+ "keywords": [
+ "image",
+ "spatie"
+ ],
+ "support": {
+ "source": "https://github.com/spatie/image/tree/2.2.5"
+ },
+ "funding": [
+ {
+ "url": "https://spatie.be/open-source/support-us",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/spatie",
+ "type": "github"
+ }
+ ],
+ "time": "2023-01-19T17:06:04+00:00"
+ },
+ {
+ "name": "spatie/image-optimizer",
+ "version": "1.6.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/image-optimizer.git",
+ "reference": "6db75529cbf8fa84117046a9d513f277aead90a0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/6db75529cbf8fa84117046a9d513f277aead90a0",
+ "reference": "6db75529cbf8fa84117046a9d513f277aead90a0",
+ "shasum": ""
+ },
+ "require": {
+ "ext-fileinfo": "*",
+ "php": "^7.3|^8.0",
+ "psr/log": "^1.0 | ^2.0 | ^3.0",
+ "symfony/process": "^4.2|^5.0|^6.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.5.21|^9.4.4",
+ "symfony/var-dumper": "^4.2|^5.0|^6.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spatie\\ImageOptimizer\\": "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": "Easily optimize images using PHP",
+ "homepage": "https://github.com/spatie/image-optimizer",
+ "keywords": [
+ "image-optimizer",
+ "spatie"
+ ],
+ "support": {
+ "issues": "https://github.com/spatie/image-optimizer/issues",
+ "source": "https://github.com/spatie/image-optimizer/tree/1.6.2"
+ },
+ "time": "2021-12-21T10:08:05+00:00"
+ },
+ {
+ "name": "spatie/laravel-medialibrary",
+ "version": "10.7.11",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/laravel-medialibrary.git",
+ "reference": "a6d562d2226c2b339db8299a3a02bacd031edabf"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/a6d562d2226c2b339db8299a3a02bacd031edabf",
+ "reference": "a6d562d2226c2b339db8299a3a02bacd031edabf",
+ "shasum": ""
+ },
+ "require": {
+ "ext-exif": "*",
+ "ext-fileinfo": "*",
+ "ext-json": "*",
+ "illuminate/bus": "^9.18|^10.0",
+ "illuminate/console": "^9.18|^10.0",
+ "illuminate/database": "^9.18|^10.0",
+ "illuminate/pipeline": "^9.18|^10.0",
+ "illuminate/support": "^9.18|^10.0",
+ "intervention/image": "^2.7",
+ "maennchen/zipstream-php": "^2.0",
+ "php": "^8.0",
+ "spatie/image": "^2.2.2",
+ "spatie/temporary-directory": "^2.0",
+ "symfony/console": "^6.0"
+ },
+ "conflict": {
+ "php-ffmpeg/php-ffmpeg": "<0.6.1"
+ },
+ "require-dev": {
+ "aws/aws-sdk-php": "^3.133.11",
+ "doctrine/dbal": "^2.13",
+ "ext-imagick": "*",
+ "ext-pdo_sqlite": "*",
+ "ext-zip": "*",
+ "guzzlehttp/guzzle": "^7.4",
+ "league/flysystem-aws-s3-v3": "^3.0",
+ "mockery/mockery": "^1.4",
+ "nunomaduro/larastan": "^2.0",
+ "orchestra/testbench": "^7.0|^8.0",
+ "pestphp/pest": "^1.21",
+ "phpstan/extension-installer": "^1.1",
+ "spatie/laravel-ray": "^1.28",
+ "spatie/pdf-to-image": "^2.1",
+ "spatie/phpunit-snapshot-assertions": "^4.2"
+ },
+ "suggest": {
+ "league/flysystem-aws-s3-v3": "Required to use AWS S3 file storage",
+ "php-ffmpeg/php-ffmpeg": "Required for generating video thumbnails",
+ "spatie/pdf-to-image": "Required for generating thumbsnails of PDFs and SVGs"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Spatie\\MediaLibrary\\MediaLibraryServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Spatie\\MediaLibrary\\": "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": "Associate files with Eloquent models",
+ "homepage": "https://github.com/spatie/laravel-medialibrary",
+ "keywords": [
+ "cms",
+ "conversion",
+ "downloads",
+ "images",
+ "laravel",
+ "laravel-medialibrary",
+ "media",
+ "spatie"
+ ],
+ "support": {
+ "issues": "https://github.com/spatie/laravel-medialibrary/issues",
+ "source": "https://github.com/spatie/laravel-medialibrary/tree/10.7.11"
+ },
+ "funding": [
+ {
+ "url": "https://spatie.be/open-source/support-us",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/spatie",
+ "type": "github"
+ }
+ ],
+ "time": "2023-02-17T08:44:20+00:00"
+ },
+ {
+ "name": "spatie/temporary-directory",
+ "version": "2.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/temporary-directory.git",
+ "reference": "e2818d871783d520b319c2d38dc37c10ecdcde20"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/temporary-directory/zipball/e2818d871783d520b319c2d38dc37c10ecdcde20",
+ "reference": "e2818d871783d520b319c2d38dc37c10ecdcde20",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.5"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spatie\\TemporaryDirectory\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Alex Vanderbist",
+ "email": "alex@spatie.be",
+ "homepage": "https://spatie.be",
+ "role": "Developer"
+ }
+ ],
+ "description": "Easily create, use and destroy temporary directories",
+ "homepage": "https://github.com/spatie/temporary-directory",
+ "keywords": [
+ "php",
+ "spatie",
+ "temporary-directory"
+ ],
+ "support": {
+ "issues": "https://github.com/spatie/temporary-directory/issues",
+ "source": "https://github.com/spatie/temporary-directory/tree/2.1.1"
+ },
+ "funding": [
+ {
+ "url": "https://spatie.be/open-source/support-us",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/spatie",
+ "type": "github"
+ }
+ ],
+ "time": "2022-08-23T07:15:15+00:00"
+ },
{
"name": "symfony/console",
"version": "v6.2.5",
diff --git a/phpunit.xml b/phpunit.xml
index 9a50e8d..a417824 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -9,20 +9,20 @@
./tests/Feature
-
+
./app
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+