From 197e7da9cc67c6595c192e540c029702fa12a15e Mon Sep 17 00:00:00 2001 From: Adrian Hopek Date: Wed, 12 Jan 2022 15:28:48 +0100 Subject: [PATCH] #2 - wip --- .env.example | 4 + app/Http/Controllers/GoogleController.php | 43 + app/Http/Middleware/Authenticate.php | 6 +- app/Http/Middleware/HandleInertiaRequests.php | 10 + .../Middleware/RedirectIfAuthenticated.php | 3 +- app/Models/User.php | 19 +- app/Providers/RouteServiceProvider.php | 2 - composer.json | 1 + composer.lock | 1411 ++--------------- config/services.php | 8 +- database/factories/UserFactory.php | 3 - .../2014_10_12_000000_create_users_table.php | 4 +- public/img/logo-white.png | Bin 0 -> 6896 bytes resources/js/Pages/Dashboard.vue | 943 ++++------- resources/js/Pages/Login.vue | 61 + resources/js/Shared/Layout/AppLayout.vue | 19 + resources/js/Shared/Layout/GuestLayout.vue | 11 + resources/js/Shared/MainMenu.vue | 285 ++++ resources/js/app.js | 14 +- resources/lang/pl.json | 3 + routes/web.php | 25 +- tailwind.config.js | 14 + 22 files changed, 994 insertions(+), 1895 deletions(-) create mode 100644 app/Http/Controllers/GoogleController.php create mode 100644 public/img/logo-white.png create mode 100644 resources/js/Pages/Login.vue create mode 100644 resources/js/Shared/Layout/AppLayout.vue create mode 100644 resources/js/Shared/Layout/GuestLayout.vue create mode 100644 resources/js/Shared/MainMenu.vue create mode 100644 resources/lang/pl.json diff --git a/.env.example b/.env.example index 7a33236..30e2550 100644 --- a/.env.example +++ b/.env.example @@ -44,3 +44,7 @@ MAIL_FROM_ADDRESS=null MAIL_FROM_NAME="${APP_NAME}" DOCKER_INSTALL_XDEBUG=false + +GOOGLE_CLIENT_ID= +GOOGLE_CLIENT_SECRET= +GOOGLE_REDIRECT= diff --git a/app/Http/Controllers/GoogleController.php b/app/Http/Controllers/GoogleController.php new file mode 100644 index 0000000..0e01966 --- /dev/null +++ b/app/Http/Controllers/GoogleController.php @@ -0,0 +1,43 @@ +driver("google")->redirect(); + } + + public function callback(AuthFactory $auth, SocialiteManager $socialiteManager): RedirectResponse + { + $socialUser = $socialiteManager->driver("google")->user(); + + try { + /** @var User $user */ + $user = User::query() + ->where("email", $socialUser->getEmail()) + ->firstOrFail(); + + $auth->guard()->login($user, true); + + $user->syncGoogleData($socialUser); + + return redirect()->route("dashboard"); + } catch (ModelNotFoundException) { + return redirect() + ->route("login") + ->withErrors([ + "oauth" => __("User does not exist."), + ]); + } + } +} diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index eaeb6c6..8192db0 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -8,10 +8,8 @@ use Illuminate\Auth\Middleware\Authenticate as Middleware; class Authenticate extends Middleware { - protected function redirectTo($request) + protected function redirectTo($request): ?string { - if (!$request->expectsJson()) { - return route("login"); - } + return route("login"); } } diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php index c39bc7c..c71c54f 100644 --- a/app/Http/Middleware/HandleInertiaRequests.php +++ b/app/Http/Middleware/HandleInertiaRequests.php @@ -11,7 +11,17 @@ class HandleInertiaRequests extends Middleware { public function share(Request $request): array { + $user = $request->user(); + return array_merge(parent::share($request), [ + "auth" => fn() => [ + "user" => $user ? [ + "name" => $user->name, + "email" => $user->email, + "role" => "Human Resources Manager", + "imageUrl" => $user->avatar, + ] : null, + ], "flash" => fn() => [ "success" => $request->session()->get("success"), "error" => $request->session()->get("error"), diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index 73c3d10..3a0367a 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -8,7 +8,6 @@ use Closure; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Symfony\Component\HttpFoundation\Response; -use Toby\Providers\RouteServiceProvider; class RedirectIfAuthenticated { @@ -18,7 +17,7 @@ class RedirectIfAuthenticated foreach ($guards as $guard) { if (Auth::guard($guard)->check()) { - return redirect(RouteServiceProvider::HOME); + return redirect()->route("login"); } } diff --git a/app/Models/User.php b/app/Models/User.php index 880eb84..335a09e 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -7,7 +7,15 @@ namespace Toby\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; +use Laravel\Socialite\Two\User as SocialUser; +/** + * @property int $id + * @property string $name + * @property string $email + * @property string $avatar + * @property string $google_id + */ class User extends Authenticatable { use HasFactory; @@ -16,15 +24,22 @@ class User extends Authenticatable protected $fillable = [ "name", "email", - "password", ]; protected $hidden = [ - "password", "remember_token", ]; protected $casts = [ "email_verified_at" => "datetime", ]; + + public function syncGoogleData(SocialUser $user): void + { + $this->name = $user->getName(); + $this->avatar = $user->getAvatar(); + $this->google_id = $user->getId(); + + $this->save(); + } } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 2b6a7cb..d3c423c 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -12,8 +12,6 @@ use Illuminate\Support\Facades\Route; class RouteServiceProvider extends ServiceProvider { - public const HOME = "/home"; - public function boot(): void { $this->configureRateLimiting(); diff --git a/composer.json b/composer.json index fcf7c40..83abbee 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,7 @@ "guzzlehttp/guzzle": "^7.0.1", "inertiajs/inertia-laravel": "^0.5.1", "laravel/framework": "^8.75", + "laravel/socialite": "^5.2", "laravel/telescope": "^4.6", "laravel/tinker": "^2.5" }, diff --git a/composer.lock b/composer.lock index 7d273d9..2b1c5e9 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": "1f888e8a9e8764750ed43fbb8697721e", + "content-hash": "85ceb3ddf8f14cb162c2e9e68ba1fd6c", "packages": [ { "name": "asm89/stack-cors", @@ -290,32 +290,28 @@ }, { "name": "doctrine/lexer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + "reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", - "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c", + "reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan": "^0.11.8", - "phpunit/phpunit": "^8.2" + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.11" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" @@ -350,7 +346,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.1" + "source": "https://github.com/doctrine/lexer/tree/1.2.2" }, "funding": [ { @@ -366,7 +362,7 @@ "type": "tidelift" } ], - "time": "2020-05-25T17:44:05+00:00" + "time": "2022-01-12T08:27:12+00:00" }, { "name": "dragonmantank/cron-expression", @@ -1263,6 +1259,75 @@ }, "time": "2021-11-30T15:53:04+00:00" }, + { + "name": "laravel/socialite", + "version": "v5.2.6", + "source": { + "type": "git", + "url": "https://github.com/laravel/socialite.git", + "reference": "b5c67f187ddcf15529ff7217fa735b132620dfac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/socialite/zipball/b5c67f187ddcf15529ff7217fa735b132620dfac", + "reference": "b5c67f187ddcf15529ff7217fa735b132620dfac", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/guzzle": "^6.0|^7.0", + "illuminate/http": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0", + "league/oauth1-client": "^1.0", + "php": "^7.2|^8.0" + }, + "require-dev": { + "illuminate/contracts": "^6.0|^7.0", + "mockery/mockery": "^1.0", + "orchestra/testbench": "^4.0|^5.0|^6.0", + "phpunit/phpunit": "^8.0|^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Socialite\\SocialiteServiceProvider" + ], + "aliases": { + "Socialite": "Laravel\\Socialite\\Facades\\Socialite" + } + } + }, + "autoload": { + "psr-4": { + "Laravel\\Socialite\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Laravel wrapper around OAuth 1 & OAuth 2 libraries.", + "homepage": "https://laravel.com", + "keywords": [ + "laravel", + "oauth" + ], + "support": { + "issues": "https://github.com/laravel/socialite/issues", + "source": "https://github.com/laravel/socialite" + }, + "time": "2021-12-07T16:32:57+00:00" + }, { "name": "laravel/telescope", "version": "v4.6.10", @@ -1733,6 +1798,82 @@ ], "time": "2021-11-21T11:48:40+00:00" }, + { + "name": "league/oauth1-client", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/oauth1-client.git", + "reference": "88dd16b0cff68eb9167bfc849707d2c40ad91ddc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/oauth1-client/zipball/88dd16b0cff68eb9167bfc849707d2c40ad91ddc", + "reference": "88dd16b0cff68eb9167bfc849707d2c40ad91ddc", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-openssl": "*", + "guzzlehttp/guzzle": "^6.0|^7.0", + "guzzlehttp/psr7": "^1.7|^2.0", + "php": ">=7.1||>=8.0" + }, + "require-dev": { + "ext-simplexml": "*", + "friendsofphp/php-cs-fixer": "^2.17", + "mockery/mockery": "^1.3.3", + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5||9.5" + }, + "suggest": { + "ext-simplexml": "For decoding XML-based responses." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev", + "dev-develop": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\OAuth1\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Corlett", + "email": "bencorlett@me.com", + "homepage": "http://www.webcomm.com.au", + "role": "Developer" + } + ], + "description": "OAuth 1.0 Client Library", + "keywords": [ + "Authentication", + "SSO", + "authorization", + "bitbucket", + "identity", + "idp", + "oauth", + "oauth1", + "single sign on", + "trello", + "tumblr", + "twitter" + ], + "support": { + "issues": "https://github.com/thephpleague/oauth1-client/issues", + "source": "https://github.com/thephpleague/oauth1-client/tree/v1.10.0" + }, + "time": "2021-08-15T23:05:49+00:00" + }, { "name": "monolog/monolog", "version": "2.3.5", @@ -5505,548 +5646,6 @@ }, "time": "2022-01-04T07:21:36+00:00" }, - { - "name": "composer/ca-bundle", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", - "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "psr/log": "^1.0", - "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.1" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-10-28T20:44:15+00:00" - }, - { - "name": "composer/composer", - "version": "2.2.4", - "source": { - "type": "git", - "url": "https://github.com/composer/composer.git", - "reference": "8a5ad75194f901e3b39ece4bbd22cbdabc79ae8f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/8a5ad75194f901e3b39ece4bbd22cbdabc79ae8f", - "reference": "8a5ad75194f901e3b39ece4bbd22cbdabc79ae8f", - "shasum": "" - }, - "require": { - "composer/ca-bundle": "^1.0", - "composer/metadata-minifier": "^1.0", - "composer/pcre": "^1.0", - "composer/semver": "^3.0", - "composer/spdx-licenses": "^1.2", - "composer/xdebug-handler": "^2.0", - "justinrainbow/json-schema": "^5.2.11", - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0 || ^2.0", - "react/promise": "^1.2 || ^2.7", - "seld/jsonlint": "^1.4", - "seld/phar-utils": "^1.0", - "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0", - "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", - "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", - "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" - }, - "require-dev": { - "phpspec/prophecy": "^1.10", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" - }, - "suggest": { - "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", - "ext-zip": "Enabling the zip extension allows you to unzip archives", - "ext-zlib": "Allow gzip compression of HTTP requests" - }, - "bin": [ - "bin/composer" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.2-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\": "src/Composer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "https://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", - "homepage": "https://getcomposer.org/", - "keywords": [ - "autoload", - "dependency", - "package" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.2.4" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-08T11:30:42+00:00" - }, - { - "name": "composer/metadata-minifier", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/metadata-minifier.git", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", - "reference": "c549d23829536f0d0e984aaabbf02af91f443207", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "composer/composer": "^2", - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\MetadataMinifier\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Small utility library that handles metadata minification and expansion.", - "keywords": [ - "composer", - "compression" - ], - "support": { - "issues": "https://github.com/composer/metadata-minifier/issues", - "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-04-07T13:37:33+00:00" - }, - { - "name": "composer/pcre", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/3d322d715c43a1ac36c7fe215fa59336265500f2", - "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^1", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/1.0.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-12-06T15:17:27+00:00" - }, - { - "name": "composer/semver", - "version": "3.2.7", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "deac27056b57e46faf136fae7b449eeaa71661ee" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/deac27056b57e46faf136fae7b449eeaa71661ee", - "reference": "deac27056b57e46faf136fae7b449eeaa71661ee", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.54", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.7" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-04T09:57:54+00:00" - }, - { - "name": "composer/spdx-licenses", - "version": "1.5.6", - "source": { - "type": "git", - "url": "https://github.com/composer/spdx-licenses.git", - "reference": "a30d487169d799745ca7280bc90fdfa693536901" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/a30d487169d799745ca7280bc90fdfa693536901", - "reference": "a30d487169d799745ca7280bc90fdfa693536901", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Spdx\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "SPDX licenses list and validation library.", - "keywords": [ - "license", - "spdx", - "validator" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/spdx-licenses/issues", - "source": "https://github.com/composer/spdx-licenses/tree/1.5.6" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-11-18T10:14:14+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "0c1a3925ec58a4ec98e992b9c7d171e9e184be0a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/0c1a3925ec58a4ec98e992b9c7d171e9e184be0a", - "reference": "0c1a3925ec58a4ec98e992b9c7d171e9e184be0a", - "shasum": "" - }, - "require": { - "composer/pcre": "^1", - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.4" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-04T17:06:45+00:00" - }, { "name": "doctrine/instantiator", "version": "1.4.0", @@ -6116,159 +5715,6 @@ ], "time": "2020-11-10T18:47:58+00:00" }, - { - "name": "enlightn/enlightn", - "version": "v1.22.1", - "source": { - "type": "git", - "url": "https://github.com/enlightn/enlightn.git", - "reference": "b4743d1abbcaf8340729a9cada2cceced33ff2c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/enlightn/enlightn/zipball/b4743d1abbcaf8340729a9cada2cceced33ff2c6", - "reference": "b4743d1abbcaf8340729a9cada2cceced33ff2c6", - "shasum": "" - }, - "require": { - "enlightn/security-checker": "^1.1", - "ext-json": "*", - "guzzlehttp/guzzle": "^5.0|^6.0|^7.0", - "laravel/framework": "^6.0|^7.0|^8.0", - "nikic/php-parser": "^4.0", - "nunomaduro/larastan": "^0.6.11|^0.7", - "php": "^7.2|^8.0", - "phpstan/phpstan": "^0.12.59", - "symfony/finder": "^4.0|^5.0" - }, - "require-dev": { - "barryvdh/laravel-ide-helper": "^2.8", - "brianium/paratest": "^6.1", - "fideloper/proxy": "^4.4", - "friendsofphp/php-cs-fixer": "^2.18", - "mockery/mockery": "^1.3", - "orchestra/testbench": "^4.0|^5.0|^6.0", - "phpunit/phpunit": "^7.5|^8.0|^9.0", - "predis/predis": "*" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Enlightn\\Enlightn\\EnlightnServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Enlightn\\Enlightn\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Paras Malhotra", - "email": "paras@laravel-enlightn.com" - }, - { - "name": "Miguel Piedrafita", - "email": "soy@miguelpiedrafita.com" - }, - { - "name": "Lars Klopstra", - "email": "lars@flowframe.nl" - } - ], - "description": "Enlightn - Your performance & security consultant, an artisan command away.", - "homepage": "https://www.laravel-enlightn.com/", - "keywords": [ - "Audit", - "analysis tool", - "dynamic analysis", - "dynamic analyzer", - "laravel", - "package", - "performance", - "security", - "static analysis", - "static analyzer" - ], - "support": { - "docs": "https://www.laravel-enlightn.com/docs/", - "issues": "https://github.com/enlightn/enlightn/issues", - "source": "https://github.com/enlightn/enlightn/tree/v1.22.1" - }, - "time": "2021-05-03T07:32:51+00:00" - }, - { - "name": "enlightn/security-checker", - "version": "v1.9.0", - "source": { - "type": "git", - "url": "https://github.com/enlightn/security-checker.git", - "reference": "dc5bce653fa4d9c792e9dcffa728c0642847c1e1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/enlightn/security-checker/zipball/dc5bce653fa4d9c792e9dcffa728c0642847c1e1", - "reference": "dc5bce653fa4d9c792e9dcffa728c0642847c1e1", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/guzzle": "^6.3|^7.0", - "php": ">=5.6", - "symfony/console": "^3.4|^4|^5", - "symfony/finder": "^3|^4|^5", - "symfony/process": "^3.4|^4|^5", - "symfony/yaml": "^3.4|^4|^5" - }, - "require-dev": { - "ext-zip": "*", - "friendsofphp/php-cs-fixer": "^2.18", - "phpunit/phpunit": "^5.5|^6|^7|^8|^9" - }, - "bin": [ - "security-checker" - ], - "type": "library", - "autoload": { - "psr-4": { - "Enlightn\\SecurityChecker\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paras Malhotra", - "email": "paras@laravel-enlightn.com" - }, - { - "name": "Miguel Piedrafita", - "email": "soy@miguelpiedrafita.com" - } - ], - "description": "A PHP dependency vulnerabilities scanner based on the Security Advisories Database.", - "keywords": [ - "package", - "php", - "scanner", - "security", - "security advisories", - "vulnerability scanner" - ], - "support": { - "issues": "https://github.com/enlightn/security-checker/issues", - "source": "https://github.com/enlightn/security-checker/tree/v1.9.0" - }, - "time": "2021-05-06T09:03:35+00:00" - }, { "name": "facade/flare-client-php", "version": "1.9.1", @@ -6652,76 +6098,6 @@ }, "time": "2020-07-09T08:09:16+00:00" }, - { - "name": "justinrainbow/json-schema", - "version": "5.2.11", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", - "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" - }, - "time": "2021-07-22T09:24:00+00:00" - }, { "name": "mockery/mockery", "version": "1.4.4", @@ -6854,16 +6230,16 @@ }, { "name": "nunomaduro/collision", - "version": "v5.10.0", + "version": "v5.11.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "3004cfa49c022183395eabc6d0e5207dfe498d00" + "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/3004cfa49c022183395eabc6d0e5207dfe498d00", - "reference": "3004cfa49c022183395eabc6d0e5207dfe498d00", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/8b610eef8582ccdc05d8f2ab23305e2d37049461", + "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461", "shasum": "" }, "require": { @@ -6925,7 +6301,7 @@ }, "funding": [ { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "url": "https://www.paypal.com/paypalme/enunomaduro", "type": "custom" }, { @@ -6937,105 +6313,7 @@ "type": "patreon" } ], - "time": "2021-09-20T15:06:32+00:00" - }, - { - "name": "nunomaduro/larastan", - "version": "v0.7.15", - "source": { - "type": "git", - "url": "https://github.com/nunomaduro/larastan.git", - "reference": "fffd371277aeca7951a841818d21f1015a0a2662" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/fffd371277aeca7951a841818d21f1015a0a2662", - "reference": "fffd371277aeca7951a841818d21f1015a0a2662", - "shasum": "" - }, - "require": { - "composer/composer": "^1.0 || ^2.0", - "ext-json": "*", - "illuminate/console": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/container": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/database": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/http": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/pipeline": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "mockery/mockery": "^0.9 || ^1.0", - "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^0.12.90", - "symfony/process": "^4.3 || ^5.0 || ^6.0" - }, - "require-dev": { - "nikic/php-parser": "4.12.0", - "orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0", - "phpunit/phpunit": "^7.3 || ^8.2 || ^9.3" - }, - "suggest": { - "orchestra/testbench": "Using Larastan for analysing a package needs Testbench" - }, - "type": "phpstan-extension", - "extra": { - "branch-alias": { - "dev-master": "0.7-dev" - }, - "phpstan": { - "includes": [ - "extension.neon" - ] - } - }, - "autoload": { - "psr-4": { - "NunoMaduro\\Larastan\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nuno Maduro", - "email": "enunomaduro@gmail.com" - } - ], - "description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel", - "keywords": [ - "PHPStan", - "code analyse", - "code analysis", - "larastan", - "laravel", - "package", - "php", - "static analysis" - ], - "support": { - "issues": "https://github.com/nunomaduro/larastan/issues", - "source": "https://github.com/nunomaduro/larastan/tree/v0.7.15" - }, - "funding": [ - { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", - "type": "custom" - }, - { - "url": "https://github.com/canvural", - "type": "github" - }, - { - "url": "https://github.com/nunomaduro", - "type": "github" - }, - { - "url": "https://www.patreon.com/nunomaduro", - "type": "patreon" - } - ], - "time": "2021-10-26T11:07:56+00:00" + "time": "2022-01-10T16:22:52+00:00" }, { "name": "phar-io/manifest", @@ -7375,70 +6653,6 @@ }, "time": "2021-12-08T12:19:24+00:00" }, - { - "name": "phpstan/phpstan", - "version": "0.12.99", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b4d40f1d759942f523be267a1bab6884f46ca3f7", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "support": { - "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.99" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", - "type": "github" - }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" - } - ], - "time": "2021-09-12T20:09:55+00:00" - }, { "name": "phpunit/php-code-coverage", "version": "9.2.10", @@ -7860,56 +7074,6 @@ ], "time": "2021-12-25T07:07:57+00:00" }, - { - "name": "react/promise", - "version": "v2.8.0", - "source": { - "type": "git", - "url": "https://github.com/reactphp/promise.git", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4", - "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36" - }, - "type": "library", - "autoload": { - "psr-4": { - "React\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Sorgalla", - "email": "jsorgalla@gmail.com" - } - ], - "description": "A lightweight implementation of CommonJS Promises/A for PHP", - "keywords": [ - "promise", - "promises" - ], - "support": { - "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v2.8.0" - }, - "time": "2020-05-12T15:16:56+00:00" - }, { "name": "sebastian/cli-parser", "version": "1.0.1", @@ -8874,255 +8038,6 @@ ], "time": "2020-09-28T06:39:44+00:00" }, - { - "name": "seld/jsonlint", - "version": "1.8.3", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", - "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", - "shasum": "" - }, - "require": { - "php": "^5.3 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "support": { - "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", - "type": "tidelift" - } - ], - "time": "2020-11-11T09:19:24+00:00" - }, - { - "name": "seld/phar-utils", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "9f3452c93ff423469c0d56450431562ca423dcee" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/9f3452c93ff423469c0d56450431562ca423dcee", - "reference": "9f3452c93ff423469c0d56450431562ca423dcee", - "shasum": "" - }, - "require": { - "php": ">=5.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Seld\\PharUtils\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "PHAR file format utilities, for when PHP phars you up", - "keywords": [ - "phar" - ], - "support": { - "issues": "https://github.com/Seldaek/phar-utils/issues", - "source": "https://github.com/Seldaek/phar-utils/tree/1.2.0" - }, - "time": "2021-12-10T11:20:11+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v6.0.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "52b3c9cce673b014915445a432339f282e002ce6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/52b3c9cce673b014915445a432339f282e002ce6", - "reference": "52b3c9cce673b014915445a432339f282e002ce6", - "shasum": "" - }, - "require": { - "php": ">=8.0.2", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides basic utilities for the filesystem", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.0.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-10-29T07:35:21+00:00" - }, - { - "name": "symfony/yaml", - "version": "v5.4.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "b9eb163846a61bb32dfc147f7859e274fab38b58" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/b9eb163846a61bb32dfc147f7859e274fab38b58", - "reference": "b9eb163846a61bb32dfc147f7859e274fab38b58", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<5.3" - }, - "require-dev": { - "symfony/console": "^5.3|^6.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "bin": [ - "Resources/bin/yaml-lint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Loads and dumps YAML files", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-12-16T21:58:21+00:00" - }, { "name": "symplify/easy-coding-standard", "version": "10.0.8", diff --git a/config/services.php b/config/services.php index 0dae23d..e535c9e 100644 --- a/config/services.php +++ b/config/services.php @@ -2,4 +2,10 @@ declare(strict_types=1); -return []; +return [ + "google" => [ + "client_id" => env("GOOGLE_CLIENT_ID"), + "client_secret" => env("GOOGLE_CLIENT_SECRET"), + "redirect" => env("GOOGLE_REDIRECT"), + ], +]; diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 52145f4..4ddc304 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace Database\Factories; use Illuminate\Database\Eloquent\Factories\Factory; -use Illuminate\Support\Facades\Hash; use Illuminate\Support\Str; class UserFactory extends Factory @@ -15,8 +14,6 @@ class UserFactory extends Factory return [ "name" => $this->faker->name(), "email" => $this->faker->unique()->safeEmail(), - "email_verified_at" => now(), - "password" => Hash::make("secret123"), "remember_token" => Str::random(10), ]; } diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 4ceb0bd..3408253 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -12,9 +12,9 @@ return new class() extends Migration { Schema::create("users", function (Blueprint $table): void { $table->id(); $table->string("name"); + $table->string("avatar")->nullable(); $table->string("email")->unique(); - $table->timestamp("email_verified_at")->nullable(); - $table->string("password"); + $table->string("google_id")->nullable(); $table->rememberToken(); $table->timestamps(); }); diff --git a/public/img/logo-white.png b/public/img/logo-white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644 --- a/resources/js/Pages/Dashboard.vue +++ b/resources/js/Pages/Dashboard.vue @@ -1,681 +1,368 @@ \ No newline at end of file diff --git a/resources/js/Shared/Layout/AppLayout.vue b/resources/js/Shared/Layout/AppLayout.vue new file mode 100644 index 0000000..ea11dfa --- /dev/null +++ b/resources/js/Shared/Layout/AppLayout.vue @@ -0,0 +1,19 @@ + + + diff --git a/resources/js/Shared/Layout/GuestLayout.vue b/resources/js/Shared/Layout/GuestLayout.vue new file mode 100644 index 0000000..e28def1 --- /dev/null +++ b/resources/js/Shared/Layout/GuestLayout.vue @@ -0,0 +1,11 @@ + + + diff --git a/resources/js/Shared/MainMenu.vue b/resources/js/Shared/MainMenu.vue new file mode 100644 index 0000000..16e4625 --- /dev/null +++ b/resources/js/Shared/MainMenu.vue @@ -0,0 +1,285 @@ + + + + diff --git a/resources/js/app.js b/resources/js/app.js index 1ef93aa..95cc0c5 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1,14 +1,24 @@ import {createApp, h} from 'vue'; -import {createInertiaApp} from '@inertiajs/inertia-vue3'; +import {createInertiaApp, Head, Link} from '@inertiajs/inertia-vue3'; import {InertiaProgress} from '@inertiajs/progress'; +import AppLayout from '@/Shared/Layout/AppLayout'; createInertiaApp({ - resolve: name => require(`./Pages/${name}`), + resolve: name => { + const page = require(`./Pages/${name}`).default; + + page.layout = page.layout || AppLayout; + + return page; + }, setup({el, App, props, plugin}) { createApp({render: () => h(App, props)}) .use(plugin) + .component('InertiaLink', Link) + .component('InertiaHead', Head) .mount(el); }, + title: title => `${title} - Toby`, }); InertiaProgress.init(); diff --git a/resources/lang/pl.json b/resources/lang/pl.json new file mode 100644 index 0000000..41d1f41 --- /dev/null +++ b/resources/lang/pl.json @@ -0,0 +1,3 @@ +{ + "User does not exist.": "Użytkownik nie istnieje." +} \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 99b6a46..75e22cc 100644 --- a/routes/web.php +++ b/routes/web.php @@ -2,6 +2,29 @@ declare(strict_types=1); +use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Route; +use Toby\Http\Controllers\GoogleController; -Route::get("/", fn() => inertia("Dashboard")); +Route::middleware("auth")->group(function (): void { + Route::get("/", fn() => inertia("Dashboard"))->name("dashboard"); + Route::get("/logout", function (Request $request) { + Auth::logout(); + + $request->session()->invalidate(); + + $request->session()->regenerateToken(); + + + return redirect()->route("login"); + }); +}); + +Route::middleware("guest")->group(function(): void { + Route::get("login", fn() => inertia("Login"))->name("login"); + Route::get("login/google/start", [GoogleController::class, "redirect"]) + ->name("login.google.start"); + Route::get("login/google/end", [GoogleController::class, "callback"]) + ->name("login.google.end"); +}); \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index 40210da..cda7b7e 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -9,6 +9,20 @@ module.exports = { fontFamily: { sans: ['Inter var', ...defaultTheme.fontFamily.sans], }, + colors: { + 'blumilk': { + '50': '#D5DFEE', + '100': '#C7D4E9', + '200': '#AABDDD', + '300': '#8CA7D1', + '400': '#6F90C6', + '500': '#527ABA', + '600': '#3C5F97', + '700': '#2C466F', + '800': '#1C2D47', + '900': '#0C141F' + }, + } }, }, plugins: [