diff --git a/bootstrap/app.php b/bootstrap/app.php index 037e17d..b926f0e 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -11,7 +11,7 @@ | */ -$app = new Illuminate\Foundation\Application( +$app = new Gecche\Multidomain\Foundation\Application( $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__) ); diff --git a/composer.json b/composer.json index 315bb81..ab2ad6a 100644 --- a/composer.json +++ b/composer.json @@ -7,6 +7,7 @@ "require": { "php": "^8.1", "auth0/login": "^7.8", + "gecche/laravel-multidomain": "^10.2", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^10.10", "laravel/tinker": "^2.8", diff --git a/composer.lock b/composer.lock index 8571ff1..6aa6058 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": "28176864af13fa0e06f1784e6e64e791", + "content-hash": "e89c848f344e4001ca7970a0888b5443", "packages": [ { "name": "auth0/auth0-php", @@ -939,6 +939,71 @@ ], "time": "2023-10-12T05:21:21+00:00" }, + { + "name": "gecche/laravel-multidomain", + "version": "v10.2", + "source": { + "type": "git", + "url": "https://github.com/gecche/laravel-multidomain.git", + "reference": "10fda309991bf58eeed0696103f12d071ada399f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/gecche/laravel-multidomain/zipball/10fda309991bf58eeed0696103f12d071ada399f", + "reference": "10fda309991bf58eeed0696103f12d071ada399f", + "shasum": "" + }, + "require": { + "laravel/framework": "^10.0" + }, + "require-dev": { + "diablomedia/phpunit-pretty-printer": "^5.0", + "mockery/mockery": "^1.5.1", + "orchestra/testbench": "^8.0", + "orchestra/testbench-browser-kit": "^8.0", + "phpunit/phpunit": "^9.6.0 || ^10.0.7" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Gecche\\Multidomain\\Foundation\\Providers\\DomainConsoleServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/Foundation/helpers.php" + ], + "psr-4": { + "Gecche\\Multidomain\\": "src/" + }, + "classmap": [] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Giacomo Terreni", + "email": "giacomo.terreni@gmail.com" + } + ], + "description": "Laravel App on a subdomains, multi-tenancy setting", + "keywords": [ + "laravel", + "multi-tenants", + "multidomain", + "multitenancy", + "subdomains" + ], + "support": { + "issues": "https://github.com/gecche/laravel-multidomain/issues", + "source": "https://github.com/gecche/laravel-multidomain/tree/v10.2" + }, + "time": "2024-02-20T09:54:57+00:00" + }, { "name": "graham-campbell/result-type", "version": "v1.1.2", diff --git a/config/app.php b/config/app.php index 650170a..8922c7d 100644 --- a/config/app.php +++ b/config/app.php @@ -26,6 +26,8 @@ App\Providers\AuthServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, + ])->replace([ + \Illuminate\Queue\QueueServiceProvider::class => \Gecche\Multidomain\Queue\QueueServiceProvider::class, ])->toArray(), 'aliases' => Facade::defaultAliases()->merge([ ])->toArray(), diff --git a/config/domain.php b/config/domain.php new file mode 100644 index 0000000..8d5bbca --- /dev/null +++ b/config/domain.php @@ -0,0 +1,27 @@ + '.env', + 'storage_dirs' => [ + 'app' => [ + 'public' => [ + ], + ], + 'framework' => [ + 'cache' => [ + ], + 'testing' => [ + ], + 'sessions' => [ + ], + 'views' => [ + ], + ], + 'logs' => [ + ], + ], + 'domains' => [ + 'diskfloppy.me' => 'diskfloppy.me', + 'dwiskfwoppy.me' => 'diskfloppy.me', + ], + ]; diff --git a/storage/diskfloppy_me/app/.gitignore b/storage/diskfloppy_me/app/.gitignore new file mode 100644 index 0000000..8f4803c --- /dev/null +++ b/storage/diskfloppy_me/app/.gitignore @@ -0,0 +1,3 @@ +* +!public/ +!.gitignore diff --git a/storage/diskfloppy_me/app/public/.gitignore b/storage/diskfloppy_me/app/public/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/diskfloppy_me/app/public/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/diskfloppy_me/framework/.gitignore b/storage/diskfloppy_me/framework/.gitignore new file mode 100644 index 0000000..05c4471 --- /dev/null +++ b/storage/diskfloppy_me/framework/.gitignore @@ -0,0 +1,9 @@ +compiled.php +config.php +down +events.scanned.php +maintenance.php +routes.php +routes.scanned.php +schedule-* +services.json diff --git a/storage/diskfloppy_me/framework/cache/.gitignore b/storage/diskfloppy_me/framework/cache/.gitignore new file mode 100644 index 0000000..01e4a6c --- /dev/null +++ b/storage/diskfloppy_me/framework/cache/.gitignore @@ -0,0 +1,3 @@ +* +!data/ +!.gitignore diff --git a/storage/diskfloppy_me/framework/sessions/.gitignore b/storage/diskfloppy_me/framework/sessions/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/diskfloppy_me/framework/sessions/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/diskfloppy_me/framework/testing/.gitignore b/storage/diskfloppy_me/framework/testing/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/diskfloppy_me/framework/testing/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/diskfloppy_me/framework/views/.gitignore b/storage/diskfloppy_me/framework/views/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/diskfloppy_me/framework/views/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/diskfloppy_me/logs/.gitignore b/storage/diskfloppy_me/logs/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/diskfloppy_me/logs/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/dwiskfwoppy_me/app/.gitignore b/storage/dwiskfwoppy_me/app/.gitignore new file mode 100644 index 0000000..8f4803c --- /dev/null +++ b/storage/dwiskfwoppy_me/app/.gitignore @@ -0,0 +1,3 @@ +* +!public/ +!.gitignore diff --git a/storage/dwiskfwoppy_me/app/public/.gitignore b/storage/dwiskfwoppy_me/app/public/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/dwiskfwoppy_me/app/public/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/dwiskfwoppy_me/framework/.gitignore b/storage/dwiskfwoppy_me/framework/.gitignore new file mode 100644 index 0000000..05c4471 --- /dev/null +++ b/storage/dwiskfwoppy_me/framework/.gitignore @@ -0,0 +1,9 @@ +compiled.php +config.php +down +events.scanned.php +maintenance.php +routes.php +routes.scanned.php +schedule-* +services.json diff --git a/storage/dwiskfwoppy_me/framework/cache/.gitignore b/storage/dwiskfwoppy_me/framework/cache/.gitignore new file mode 100644 index 0000000..01e4a6c --- /dev/null +++ b/storage/dwiskfwoppy_me/framework/cache/.gitignore @@ -0,0 +1,3 @@ +* +!data/ +!.gitignore diff --git a/storage/dwiskfwoppy_me/framework/sessions/.gitignore b/storage/dwiskfwoppy_me/framework/sessions/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/dwiskfwoppy_me/framework/sessions/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/dwiskfwoppy_me/framework/testing/.gitignore b/storage/dwiskfwoppy_me/framework/testing/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/dwiskfwoppy_me/framework/testing/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/dwiskfwoppy_me/framework/views/.gitignore b/storage/dwiskfwoppy_me/framework/views/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/dwiskfwoppy_me/framework/views/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/storage/dwiskfwoppy_me/logs/.gitignore b/storage/dwiskfwoppy_me/logs/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/storage/dwiskfwoppy_me/logs/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore