diff --git a/.env.example b/.env.example index 00b6110..c978a11 100644 --- a/.env.example +++ b/.env.example @@ -19,7 +19,7 @@ BROADCAST_DRIVER=log CACHE_DRIVER=file FILESYSTEM_DISK=local QUEUE_CONNECTION=sync -SESSION_DRIVER=file +SESSION_DRIVER=database SESSION_LIFETIME=120 MEMCACHED_HOST=127.0.0.1 diff --git a/app/Actions/Fortify/CreateNewUser.php b/app/Actions/Fortify/CreateNewUser.php new file mode 100644 index 0000000..a9f1653 --- /dev/null +++ b/app/Actions/Fortify/CreateNewUser.php @@ -0,0 +1,36 @@ + ['required', 'string', 'max:255'], + 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], + 'password' => $this->passwordRules(), + 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '', + ])->validate(); + + return User::create([ + 'name' => $input['name'], + 'email' => $input['email'], + 'password' => Hash::make($input['password']), + ]); + } +} diff --git a/app/Actions/Fortify/PasswordValidationRules.php b/app/Actions/Fortify/PasswordValidationRules.php new file mode 100644 index 0000000..78ed8cf --- /dev/null +++ b/app/Actions/Fortify/PasswordValidationRules.php @@ -0,0 +1,18 @@ + $this->passwordRules(), + ])->validate(); + + $user->forceFill([ + 'password' => Hash::make($input['password']), + ])->save(); + } +} diff --git a/app/Actions/Fortify/UpdateUserPassword.php b/app/Actions/Fortify/UpdateUserPassword.php new file mode 100644 index 0000000..690f324 --- /dev/null +++ b/app/Actions/Fortify/UpdateUserPassword.php @@ -0,0 +1,35 @@ + ['required', 'string'], + 'password' => $this->passwordRules(), + ])->after(function ($validator) use ($user, $input) { + if (! isset($input['current_password']) || ! Hash::check($input['current_password'], $user->password)) { + $validator->errors()->add('current_password', __('The provided password does not match your current password.')); + } + })->validateWithBag('updatePassword'); + + $user->forceFill([ + 'password' => Hash::make($input['password']), + ])->save(); + } +} diff --git a/app/Actions/Fortify/UpdateUserProfileInformation.php b/app/Actions/Fortify/UpdateUserProfileInformation.php new file mode 100644 index 0000000..c757632 --- /dev/null +++ b/app/Actions/Fortify/UpdateUserProfileInformation.php @@ -0,0 +1,59 @@ + ['required', 'string', 'max:255'], + 'email' => ['required', 'email', 'max:255', Rule::unique('users')->ignore($user->id)], + 'photo' => ['nullable', 'mimes:jpg,jpeg,png', 'max:1024'], + ])->validateWithBag('updateProfileInformation'); + + if (isset($input['photo'])) { + $user->updateProfilePhoto($input['photo']); + } + + if ($input['email'] !== $user->email && + $user instanceof MustVerifyEmail) { + $this->updateVerifiedUser($user, $input); + } else { + $user->forceFill([ + 'name' => $input['name'], + 'email' => $input['email'], + ])->save(); + } + } + + /** + * Update the given verified user's profile information. + * + * @param mixed $user + * @param array $input + * @return void + */ + protected function updateVerifiedUser($user, array $input) + { + $user->forceFill([ + 'name' => $input['name'], + 'email' => $input['email'], + 'email_verified_at' => null, + ])->save(); + + $user->sendEmailVerificationNotification(); + } +} diff --git a/app/Actions/Jetstream/DeleteUser.php b/app/Actions/Jetstream/DeleteUser.php new file mode 100644 index 0000000..4846a06 --- /dev/null +++ b/app/Actions/Jetstream/DeleteUser.php @@ -0,0 +1,21 @@ +deleteProfilePhoto(); + $user->tokens->each->delete(); + $user->delete(); + } +} diff --git a/app/Models/User.php b/app/Models/User.php index 23b4063..1a3ac04 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,20 +2,26 @@ namespace App\Models; -// use Illuminate\Contracts\Auth\MustVerifyEmail; +use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; +use Laravel\Fortify\TwoFactorAuthenticatable; +use Laravel\Jetstream\HasProfilePhoto; use Laravel\Sanctum\HasApiTokens; class User extends Authenticatable { - use HasApiTokens, HasFactory, Notifiable; + use HasApiTokens; + use HasFactory; + use HasProfilePhoto; + use Notifiable; + use TwoFactorAuthenticatable; /** * The attributes that are mass assignable. * - * @var array + * @var string[] */ protected $fillable = [ 'name', @@ -26,19 +32,30 @@ class User extends Authenticatable /** * The attributes that should be hidden for serialization. * - * @var array + * @var array */ protected $hidden = [ 'password', 'remember_token', + 'two_factor_recovery_codes', + 'two_factor_secret', ]; /** * The attributes that should be cast. * - * @var array + * @var array */ protected $casts = [ 'email_verified_at' => 'datetime', ]; + + /** + * The accessors to append to the model's array form. + * + * @var array + */ + protected $appends = [ + 'profile_photo_url', + ]; } diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php new file mode 100644 index 0000000..9f2f3c1 --- /dev/null +++ b/app/Providers/FortifyServiceProvider.php @@ -0,0 +1,49 @@ +email; + + return Limit::perMinute(5)->by($email.$request->ip()); + }); + + RateLimiter::for('two-factor', function (Request $request) { + return Limit::perMinute(5)->by($request->session()->get('login.id')); + }); + } +} diff --git a/app/Providers/JetstreamServiceProvider.php b/app/Providers/JetstreamServiceProvider.php new file mode 100644 index 0000000..491c127 --- /dev/null +++ b/app/Providers/JetstreamServiceProvider.php @@ -0,0 +1,49 @@ +configurePermissions(); + + Jetstream::deleteUsersUsing(DeleteUser::class); + } + + /** + * Configure the permissions that are available within the application. + * + * @return void + */ + protected function configurePermissions() + { + Jetstream::defaultApiTokenPermissions(['read']); + + Jetstream::permissions([ + 'create', + 'read', + 'update', + 'delete', + ]); + } +} diff --git a/app/View/Components/AppLayout.php b/app/View/Components/AppLayout.php new file mode 100644 index 0000000..b45d342 --- /dev/null +++ b/app/View/Components/AppLayout.php @@ -0,0 +1,18 @@ +=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.5|^6.5|^9.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Jaybizzle\\CrawlerDetect\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Beech", + "email": "m@rkbee.ch", + "role": "Developer" + } + ], + "description": "CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent", + "homepage": "https://github.com/JayBizzle/Crawler-Detect/", + "keywords": [ + "crawler", + "crawler detect", + "crawler detector", + "crawlerdetect", + "php crawler detect" + ], + "support": { + "issues": "https://github.com/JayBizzle/Crawler-Detect/issues", + "source": "https://github.com/JayBizzle/Crawler-Detect/tree/v1.2.112" + }, + "time": "2022-10-05T21:52:44+00:00" + }, + { + "name": "jenssegers/agent", + "version": "v2.6.4", + "source": { + "type": "git", + "url": "https://github.com/jenssegers/agent.git", + "reference": "daa11c43729510b3700bc34d414664966b03bffe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jenssegers/agent/zipball/daa11c43729510b3700bc34d414664966b03bffe", + "reference": "daa11c43729510b3700bc34d414664966b03bffe", + "shasum": "" + }, + "require": { + "jaybizzle/crawler-detect": "^1.2", + "mobiledetect/mobiledetectlib": "^2.7.6", + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5.0|^6.0|^7.0" + }, + "suggest": { + "illuminate/support": "Required for laravel service providers" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "laravel": { + "providers": [ + "Jenssegers\\Agent\\AgentServiceProvider" + ], + "aliases": { + "Agent": "Jenssegers\\Agent\\Facades\\Agent" + } + } + }, + "autoload": { + "psr-4": { + "Jenssegers\\Agent\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jens Segers", + "homepage": "https://jenssegers.com" + } + ], + "description": "Desktop/mobile user agent parser with support for Laravel, based on Mobiledetect", + "homepage": "https://github.com/jenssegers/agent", + "keywords": [ + "Agent", + "browser", + "desktop", + "laravel", + "mobile", + "platform", + "user agent", + "useragent" + ], + "support": { + "issues": "https://github.com/jenssegers/agent/issues", + "source": "https://github.com/jenssegers/agent/tree/v2.6.4" + }, + "funding": [ + { + "url": "https://github.com/jenssegers", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/jenssegers/agent", + "type": "tidelift" + } + ], + "time": "2020-06-13T08:05:20+00:00" + }, + { + "name": "laravel/fortify", + "version": "v1.13.4", + "source": { + "type": "git", + "url": "https://github.com/laravel/fortify.git", + "reference": "9a68cf2deb37d1796b6e2fd97d3c61f086868914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/fortify/zipball/9a68cf2deb37d1796b6e2fd97d3c61f086868914", + "reference": "9a68cf2deb37d1796b6e2fd97d3c61f086868914", + "shasum": "" + }, + "require": { + "bacon/bacon-qr-code": "^2.0", + "ext-json": "*", + "illuminate/support": "^8.82|^9.0", + "php": "^7.3|^8.0", + "pragmarx/google2fa": "^7.0|^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "orchestra/testbench": "^6.0|^7.0", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Fortify\\FortifyServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Fortify\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Backend controllers and scaffolding for Laravel authentication.", + "keywords": [ + "auth", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/fortify/issues", + "source": "https://github.com/laravel/fortify" + }, + "time": "2022-09-30T13:20:14+00:00" + }, { "name": "laravel/framework", "version": "v9.35.1", @@ -1083,6 +1382,76 @@ }, "time": "2022-10-11T17:30:47+00:00" }, + { + "name": "laravel/jetstream", + "version": "v2.12.3", + "source": { + "type": "git", + "url": "https://github.com/laravel/jetstream.git", + "reference": "0abb8071c543823855f1618a448dbd900bafda3a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/jetstream/zipball/0abb8071c543823855f1618a448dbd900bafda3a", + "reference": "0abb8071c543823855f1618a448dbd900bafda3a", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/console": "^9.21", + "illuminate/support": "^9.21", + "jenssegers/agent": "^2.6", + "laravel/fortify": "^1.13.3", + "php": "^8.0.2" + }, + "conflict": { + "laravel/framework": "<9.19.0" + }, + "require-dev": { + "inertiajs/inertia-laravel": "^0.6.3", + "laravel/sanctum": "^3.0", + "mockery/mockery": "^1.0", + "orchestra/testbench": "^7.0", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Jetstream\\JetstreamServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Jetstream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Tailwind scaffolding for the Laravel framework.", + "keywords": [ + "auth", + "laravel", + "tailwind" + ], + "support": { + "issues": "https://github.com/laravel/jetstream/issues", + "source": "https://github.com/laravel/jetstream" + }, + "time": "2022-09-26T13:49:44+00:00" + }, { "name": "laravel/sanctum", "version": "v3.0.1", @@ -1611,6 +1980,135 @@ ], "time": "2022-04-17T13:12:02+00:00" }, + { + "name": "livewire/livewire", + "version": "v2.10.7", + "source": { + "type": "git", + "url": "https://github.com/livewire/livewire.git", + "reference": "fa0441bf82f1674beecb3a8ad8a4ae428736ed18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/livewire/livewire/zipball/fa0441bf82f1674beecb3a8ad8a4ae428736ed18", + "reference": "fa0441bf82f1674beecb3a8ad8a4ae428736ed18", + "shasum": "" + }, + "require": { + "illuminate/database": "^7.0|^8.0|^9.0", + "illuminate/support": "^7.0|^8.0|^9.0", + "illuminate/validation": "^7.0|^8.0|^9.0", + "league/mime-type-detection": "^1.9", + "php": "^7.2.5|^8.0", + "symfony/http-kernel": "^5.0|^6.0" + }, + "require-dev": { + "calebporzio/sushi": "^2.1", + "laravel/framework": "^7.0|^8.0|^9.0", + "mockery/mockery": "^1.3.1", + "orchestra/testbench": "^5.0|^6.0|^7.0", + "orchestra/testbench-dusk": "^5.2|^6.0|^7.0", + "phpunit/phpunit": "^8.4|^9.0", + "psy/psysh": "@stable" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Livewire\\LivewireServiceProvider" + ], + "aliases": { + "Livewire": "Livewire\\Livewire" + } + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Livewire\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Caleb Porzio", + "email": "calebporzio@gmail.com" + } + ], + "description": "A front-end framework for Laravel.", + "support": { + "issues": "https://github.com/livewire/livewire/issues", + "source": "https://github.com/livewire/livewire/tree/v2.10.7" + }, + "funding": [ + { + "url": "https://github.com/livewire", + "type": "github" + } + ], + "time": "2022-08-08T13:52:53+00:00" + }, + { + "name": "mobiledetect/mobiledetectlib", + "version": "2.8.39", + "source": { + "type": "git", + "url": "https://github.com/serbanghita/Mobile-Detect.git", + "reference": "0fd6753003fc870f6e229bae869cc1337c99bc45" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/0fd6753003fc870f6e229bae869cc1337c99bc45", + "reference": "0fd6753003fc870f6e229bae869cc1337c99bc45", + "shasum": "" + }, + "require": { + "php": ">=5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.35||~5.7" + }, + "type": "library", + "autoload": { + "psr-0": { + "Detection": "namespaced/" + }, + "classmap": [ + "Mobile_Detect.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Serban Ghita", + "email": "serbanghita@gmail.com", + "homepage": "http://mobiledetect.net", + "role": "Developer" + } + ], + "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", + "homepage": "https://github.com/serbanghita/Mobile-Detect", + "keywords": [ + "detect mobile devices", + "mobile", + "mobile detect", + "mobile detector", + "php mobile detect" + ], + "support": { + "issues": "https://github.com/serbanghita/Mobile-Detect/issues", + "source": "https://github.com/serbanghita/Mobile-Detect/tree/2.8.39" + }, + "time": "2022-02-17T19:24:25+00:00" + }, { "name": "monolog/monolog", "version": "2.8.0", @@ -2104,6 +2602,73 @@ ], "time": "2022-08-01T11:03:24+00:00" }, + { + "name": "paragonie/constant_time_encoding", + "version": "v2.6.3", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "58c3f47f650c94ec05a151692652a868995d2938" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/58c3f47f650c94ec05a151692652a868995d2938", + "reference": "58c3f47f650c94ec05a151692652a868995d2938", + "shasum": "" + }, + "require": { + "php": "^7|^8" + }, + "require-dev": { + "phpunit/phpunit": "^6|^7|^8|^9", + "vimeo/psalm": "^1|^2|^3|^4" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/constant_time_encoding/issues", + "source": "https://github.com/paragonie/constant_time_encoding" + }, + "time": "2022-06-14T06:56:20+00:00" + }, { "name": "phpoption/phpoption", "version": "1.9.0", @@ -2179,6 +2744,58 @@ ], "time": "2022-07-30T15:51:26+00:00" }, + { + "name": "pragmarx/google2fa", + "version": "v8.0.1", + "source": { + "type": "git", + "url": "https://github.com/antonioribeiro/google2fa.git", + "reference": "80c3d801b31fe165f8fe99ea085e0a37834e1be3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/80c3d801b31fe165f8fe99ea085e0a37834e1be3", + "reference": "80c3d801b31fe165f8fe99ea085e0a37834e1be3", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "^1.0|^2.0", + "php": "^7.1|^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.18", + "phpunit/phpunit": "^7.5.15|^8.5|^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "PragmaRX\\Google2FA\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Antonio Carlos Ribeiro", + "email": "acr@antoniocarlosribeiro.com", + "role": "Creator & Designer" + } + ], + "description": "A One Time Password Authentication package, compatible with Google Authenticator.", + "keywords": [ + "2fa", + "Authentication", + "Two Factor Authentication", + "google2fa" + ], + "support": { + "issues": "https://github.com/antonioribeiro/google2fa/issues", + "source": "https://github.com/antonioribeiro/google2fa/tree/v8.0.1" + }, + "time": "2022-06-13T21:57:56+00:00" + }, { "name": "psr/container", "version": "2.0.2", diff --git a/config/app.php b/config/app.php index ef76a7e..f66af84 100644 --- a/config/app.php +++ b/config/app.php @@ -194,6 +194,8 @@ // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, + App\Providers\FortifyServiceProvider::class, + App\Providers\JetstreamServiceProvider::class, ], diff --git a/config/fortify.php b/config/fortify.php new file mode 100644 index 0000000..510a539 --- /dev/null +++ b/config/fortify.php @@ -0,0 +1,147 @@ + 'web', + + /* + |-------------------------------------------------------------------------- + | Fortify Password Broker + |-------------------------------------------------------------------------- + | + | Here you may specify which password broker Fortify can use when a user + | is resetting their password. This configured value should match one + | of your password brokers setup in your "auth" configuration file. + | + */ + + 'passwords' => 'users', + + /* + |-------------------------------------------------------------------------- + | Username / Email + |-------------------------------------------------------------------------- + | + | This value defines which model attribute should be considered as your + | application's "username" field. Typically, this might be the email + | address of the users but you are free to change this value here. + | + | Out of the box, Fortify expects forgot password and reset password + | requests to have a field named 'email'. If the application uses + | another name for the field you may define it below as needed. + | + */ + + 'username' => 'email', + + 'email' => 'email', + + /* + |-------------------------------------------------------------------------- + | Home Path + |-------------------------------------------------------------------------- + | + | Here you may configure the path where users will get redirected during + | authentication or password reset when the operations are successful + | and the user is authenticated. You are free to change this value. + | + */ + + 'home' => RouteServiceProvider::HOME, + + /* + |-------------------------------------------------------------------------- + | Fortify Routes Prefix / Subdomain + |-------------------------------------------------------------------------- + | + | Here you may specify which prefix Fortify will assign to all the routes + | that it registers with the application. If necessary, you may change + | subdomain under which all of the Fortify routes will be available. + | + */ + + 'prefix' => '', + + 'domain' => null, + + /* + |-------------------------------------------------------------------------- + | Fortify Routes Middleware + |-------------------------------------------------------------------------- + | + | Here you may specify which middleware Fortify will assign to the routes + | that it registers with the application. If necessary, you may change + | these middleware but typically this provided default is preferred. + | + */ + + 'middleware' => ['web'], + + /* + |-------------------------------------------------------------------------- + | Rate Limiting + |-------------------------------------------------------------------------- + | + | By default, Fortify will throttle logins to five requests per minute for + | every email and IP address combination. However, if you would like to + | specify a custom rate limiter to call then you may specify it here. + | + */ + + 'limiters' => [ + 'login' => 'login', + 'two-factor' => 'two-factor', + ], + + /* + |-------------------------------------------------------------------------- + | Register View Routes + |-------------------------------------------------------------------------- + | + | Here you may specify if the routes returning views should be disabled as + | you may not need them when building your own application. This may be + | especially true if you're writing a custom single-page application. + | + */ + + 'views' => true, + + /* + |-------------------------------------------------------------------------- + | Features + |-------------------------------------------------------------------------- + | + | Some of the Fortify features are optional. You may disable the features + | by removing them from this array. You're free to only remove some of + | these features or you can even remove all of these if you need to. + | + */ + + 'features' => [ + Features::registration(), + Features::resetPasswords(), + // Features::emailVerification(), + Features::updateProfileInformation(), + Features::updatePasswords(), + Features::twoFactorAuthentication([ + 'confirm' => true, + 'confirmPassword' => true, + // 'window' => 0, + ]), + ], + +]; diff --git a/config/jetstream.php b/config/jetstream.php new file mode 100644 index 0000000..d5e5f11 --- /dev/null +++ b/config/jetstream.php @@ -0,0 +1,81 @@ + 'livewire', + + /* + |-------------------------------------------------------------------------- + | Jetstream Route Middleware + |-------------------------------------------------------------------------- + | + | Here you may specify which middleware Jetstream will assign to the routes + | that it registers with the application. When necessary, you may modify + | these middleware; however, this default value is usually sufficient. + | + */ + + 'middleware' => ['web'], + + 'auth_session' => AuthenticateSession::class, + + /* + |-------------------------------------------------------------------------- + | Jetstream Guard + |-------------------------------------------------------------------------- + | + | Here you may specify the authentication guard Jetstream will use while + | authenticating users. This value should correspond with one of your + | guards that is already present in your "auth" configuration file. + | + */ + + 'guard' => 'sanctum', + + /* + |-------------------------------------------------------------------------- + | Features + |-------------------------------------------------------------------------- + | + | Some of Jetstream's features are optional. You may disable the features + | by removing them from this array. You're free to only remove some of + | these features or you can even remove all of these if you need to. + | + */ + + 'features' => [ + // Features::termsAndPrivacyPolicy(), + // Features::profilePhotos(), + // Features::api(), + // Features::teams(['invitations' => true]), + Features::accountDeletion(), + ], + + /* + |-------------------------------------------------------------------------- + | Profile Photo Disk + |-------------------------------------------------------------------------- + | + | This configuration value determines the default disk that will be used + | when storing profile photos for your application's users. Typically + | this will be the "public" disk but you may adjust this if needed. + | + */ + + 'profile_photo_disk' => 'public', + +]; diff --git a/config/session.php b/config/session.php index 8fed97c..cbcaf0b 100644 --- a/config/session.php +++ b/config/session.php @@ -18,7 +18,7 @@ | */ - 'driver' => env('SESSION_DRIVER', 'file'), + 'driver' => env('SESSION_DRIVER', 'database'), /* |-------------------------------------------------------------------------- diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 41f8ae8..8705898 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -2,24 +2,31 @@ namespace Database\Factories; +use App\Models\Team; +use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; +use Laravel\Jetstream\Features; -/** - * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User> - */ class UserFactory extends Factory { + /** + * The name of the factory's corresponding model. + * + * @var string + */ + protected $model = User::class; + /** * Define the model's default state. * - * @return array + * @return array */ public function definition() { return [ - 'name' => fake()->name(), - 'email' => fake()->unique()->safeEmail(), + 'name' => $this->faker->name(), + 'email' => $this->faker->unique()->safeEmail(), 'email_verified_at' => now(), 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 'remember_token' => Str::random(10), @@ -29,12 +36,34 @@ public function definition() /** * Indicate that the model's email address should be unverified. * - * @return static + * @return \Illuminate\Database\Eloquent\Factories\Factory */ public function unverified() { - return $this->state(fn (array $attributes) => [ - 'email_verified_at' => null, - ]); + return $this->state(function (array $attributes) { + return [ + 'email_verified_at' => null, + ]; + }); + } + + /** + * Indicate that the user should have a personal team. + * + * @return $this + */ + public function withPersonalTeam() + { + if (! Features::hasTeamFeatures()) { + return $this->state([]); + } + + return $this->has( + Team::factory() + ->state(function (array $attributes, User $user) { + return ['name' => $user->name.'\'s Team', 'user_id' => $user->id, 'personal_team' => true]; + }), + 'ownedTeams' + ); } } 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 cf6b776..84c648c 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -20,6 +20,8 @@ public function up() $table->timestamp('email_verified_at')->nullable(); $table->string('password'); $table->rememberToken(); + $table->foreignId('current_team_id')->nullable(); + $table->string('profile_photo_path', 2048)->nullable(); $table->timestamps(); }); } diff --git a/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php b/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php new file mode 100644 index 0000000..6acbf7b --- /dev/null +++ b/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php @@ -0,0 +1,50 @@ +text('two_factor_secret') + ->after('password') + ->nullable(); + + $table->text('two_factor_recovery_codes') + ->after('two_factor_secret') + ->nullable(); + + if (Fortify::confirmsTwoFactorAuthentication()) { + $table->timestamp('two_factor_confirmed_at') + ->after('two_factor_recovery_codes') + ->nullable(); + } + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn(array_merge([ + 'two_factor_secret', + 'two_factor_recovery_codes', + ], Fortify::confirmsTwoFactorAuthentication() ? [ + 'two_factor_confirmed_at', + ] : [])); + }); + } +}; diff --git a/database/migrations/2022_10_13_122949_create_sessions_table.php b/database/migrations/2022_10_13_122949_create_sessions_table.php new file mode 100644 index 0000000..06c3e45 --- /dev/null +++ b/database/migrations/2022_10_13_122949_create_sessions_table.php @@ -0,0 +1,35 @@ +string('id')->primary(); + $table->foreignId('user_id')->nullable()->index(); + $table->string('ip_address', 45)->nullable(); + $table->text('user_agent')->nullable(); + $table->longText('payload'); + $table->integer('last_activity')->index(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('sessions'); + } +}; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a0b5f2a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,968 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "@esbuild/android-arm": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.10.tgz", + "integrity": "sha512-FNONeQPy/ox+5NBkcSbYJxoXj9GWu8gVGJTVmUyoOCKQFDTrHVKgNSzChdNt0I8Aj/iKcsDf2r9BFwv+FSNUXg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.10.tgz", + "integrity": "sha512-w0Ou3Z83LOYEkwaui2M8VwIp+nLi/NA60lBLMvaJ+vXVMcsARYdEzLNE7RSm4+lSg4zq4d7fAVuzk7PNQ5JFgg==", + "dev": true, + "optional": true + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@tailwindcss/forms": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.3.tgz", + "integrity": "sha512-y5mb86JUoiUgBjY/o6FJSFZSEttfb3Q5gllE4xoKjAAD+vBrnIhE4dViwUuow3va8mpH4s9jyUbUbrRGoRdc2Q==", + "dev": true, + "requires": { + "mini-svg-data-uri": "^1.2.3" + } + }, + "@tailwindcss/typography": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.7.tgz", + "integrity": "sha512-JTTSTrgZfp6Ki4svhPA4mkd9nmQ/j9EfE7SbHJ1cLtthKkpW2OxsFXzSmxbhYbEkfNIyAyhle5p4SYyKRbz/jg==", + "dev": true, + "requires": { + "lodash.castarray": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "postcss-selector-parser": "6.0.10" + } + }, + "@vue/reactivity": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz", + "integrity": "sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==", + "dev": true, + "requires": { + "@vue/shared": "3.1.5" + } + }, + "@vue/shared": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz", + "integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA==", + "dev": true + }, + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "acorn-node": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "dev": true, + "requires": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + } + }, + "acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true + }, + "alpinejs": { + "version": "3.10.4", + "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.10.4.tgz", + "integrity": "sha512-AC6Xchlb/xURO7F93OSMItooClpzGNZRM5+rDa6/3Y20mPxQs1TQ/wfiwiH4mtcVt8yTxdkOW5dOl8CBCK095A==", + "dev": true, + "requires": { + "@vue/reactivity": "~3.1.1" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "autoprefixer": { + "version": "10.4.12", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.12.tgz", + "integrity": "sha512-WrCGV9/b97Pa+jtwf5UGaRjgQIg7OK3D06GnoYoZNcG1Xb8Gt3EfuKjlhh9i/VtT16g6PYjZ69jdJ2g8FxSC4Q==", + "dev": true, + "requires": { + "browserslist": "^4.21.4", + "caniuse-lite": "^1.0.30001407", + "fraction.js": "^4.2.0", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.0", + "postcss-value-parser": "^4.2.0" + } + }, + "axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dev": true, + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + } + }, + "camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001419", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001419.tgz", + "integrity": "sha512-aFO1r+g6R7TW+PNQxKzjITwLOyDhVRLjW0LcwS/HCZGUUKTGNp9+IwLC4xyDSZBygVL/mxaFR3HIV6wEKQuSzw==", + "dev": true + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true + }, + "defined": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", + "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", + "dev": true + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true + }, + "detective": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", + "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==", + "dev": true, + "requires": { + "acorn-node": "^1.8.2", + "defined": "^1.0.0", + "minimist": "^1.2.6" + } + }, + "didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true + }, + "dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.4.281", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.281.tgz", + "integrity": "sha512-yer0w5wCYdFoZytfmbNhwiGI/3cW06+RV7E23ln4490DVMxs7PvYpbsrSmAiBn/V6gode8wvJlST2YfWgvzWIg==", + "dev": true + }, + "esbuild": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.10.tgz", + "integrity": "sha512-N7wBhfJ/E5fzn/SpNgX+oW2RLRjwaL8Y0ezqNqhjD6w0H2p0rDuEz2FKZqpqLnO8DCaWumKe8dsC/ljvVSSxng==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.15.10", + "@esbuild/linux-loong64": "0.15.10", + "esbuild-android-64": "0.15.10", + "esbuild-android-arm64": "0.15.10", + "esbuild-darwin-64": "0.15.10", + "esbuild-darwin-arm64": "0.15.10", + "esbuild-freebsd-64": "0.15.10", + "esbuild-freebsd-arm64": "0.15.10", + "esbuild-linux-32": "0.15.10", + "esbuild-linux-64": "0.15.10", + "esbuild-linux-arm": "0.15.10", + "esbuild-linux-arm64": "0.15.10", + "esbuild-linux-mips64le": "0.15.10", + "esbuild-linux-ppc64le": "0.15.10", + "esbuild-linux-riscv64": "0.15.10", + "esbuild-linux-s390x": "0.15.10", + "esbuild-netbsd-64": "0.15.10", + "esbuild-openbsd-64": "0.15.10", + "esbuild-sunos-64": "0.15.10", + "esbuild-windows-32": "0.15.10", + "esbuild-windows-64": "0.15.10", + "esbuild-windows-arm64": "0.15.10" + } + }, + "esbuild-android-64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.10.tgz", + "integrity": "sha512-UI7krF8OYO1N7JYTgLT9ML5j4+45ra3amLZKx7LO3lmLt1Ibn8t3aZbX5Pu4BjWiqDuJ3m/hsvhPhK/5Y/YpnA==", + "dev": true, + "optional": true + }, + "esbuild-android-arm64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.10.tgz", + "integrity": "sha512-EOt55D6xBk5O05AK8brXUbZmoFj4chM8u3riGflLa6ziEoVvNjRdD7Cnp82NHQGfSHgYR06XsPI8/sMuA/cUwg==", + "dev": true, + "optional": true + }, + "esbuild-darwin-64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.10.tgz", + "integrity": "sha512-hbDJugTicqIm+WKZgp208d7FcXcaK8j2c0l+fqSJ3d2AzQAfjEYDRM3Z2oMeqSJ9uFxyj/muSACLdix7oTstRA==", + "dev": true, + "optional": true + }, + "esbuild-darwin-arm64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.10.tgz", + "integrity": "sha512-M1t5+Kj4IgSbYmunf2BB6EKLkWUq+XlqaFRiGOk8bmBapu9bCDrxjf4kUnWn59Dka3I27EiuHBKd1rSO4osLFQ==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.10.tgz", + "integrity": "sha512-KMBFMa7C8oc97nqDdoZwtDBX7gfpolkk6Bcmj6YFMrtCMVgoU/x2DI1p74DmYl7CSS6Ppa3xgemrLrr5IjIn0w==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-arm64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.10.tgz", + "integrity": "sha512-m2KNbuCX13yQqLlbSojFMHpewbn8wW5uDS6DxRpmaZKzyq8Dbsku6hHvh2U+BcLwWY4mpgXzFUoENEf7IcioGg==", + "dev": true, + "optional": true + }, + "esbuild-linux-32": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.10.tgz", + "integrity": "sha512-guXrwSYFAvNkuQ39FNeV4sNkNms1bLlA5vF1H0cazZBOLdLFIny6BhT+TUbK/hdByMQhtWQ5jI9VAmPKbVPu1w==", + "dev": true, + "optional": true + }, + "esbuild-linux-64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.10.tgz", + "integrity": "sha512-jd8XfaSJeucMpD63YNMO1JCrdJhckHWcMv6O233bL4l6ogQKQOxBYSRP/XLWP+6kVTu0obXovuckJDcA0DKtQA==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.10.tgz", + "integrity": "sha512-6N8vThLL/Lysy9y4Ex8XoLQAlbZKUyExCWyayGi2KgTBelKpPgj6RZnUaKri0dHNPGgReJriKVU6+KDGQwn10A==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.10.tgz", + "integrity": "sha512-GByBi4fgkvZFTHFDYNftu1DQ1GzR23jws0oWyCfhnI7eMOe+wgwWrc78dbNk709Ivdr/evefm2PJiUBMiusS1A==", + "dev": true, + "optional": true + }, + "esbuild-linux-mips64le": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.10.tgz", + "integrity": "sha512-BxP+LbaGVGIdQNJUNF7qpYjEGWb0YyHVSKqYKrn+pTwH/SiHUxFyJYSP3pqkku61olQiSBnSmWZ+YUpj78Tw7Q==", + "dev": true, + "optional": true + }, + "esbuild-linux-ppc64le": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.10.tgz", + "integrity": "sha512-LoSQCd6498PmninNgqd/BR7z3Bsk/mabImBWuQ4wQgmQEeanzWd5BQU2aNi9mBURCLgyheuZS6Xhrw5luw3OkQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-riscv64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.10.tgz", + "integrity": "sha512-Lrl9Cr2YROvPV4wmZ1/g48httE8z/5SCiXIyebiB5N8VT7pX3t6meI7TQVHw/wQpqP/AF4SksDuFImPTM7Z32Q==", + "dev": true, + "optional": true + }, + "esbuild-linux-s390x": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.10.tgz", + "integrity": "sha512-ReP+6q3eLVVP2lpRrvl5EodKX7EZ1bS1/z5j6hsluAlZP5aHhk6ghT6Cq3IANvvDdscMMCB4QEbI+AjtvoOFpA==", + "dev": true, + "optional": true + }, + "esbuild-netbsd-64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.10.tgz", + "integrity": "sha512-iGDYtJCMCqldMskQ4eIV+QSS/CuT7xyy9i2/FjpKvxAuCzrESZXiA1L64YNj6/afuzfBe9i8m/uDkFHy257hTw==", + "dev": true, + "optional": true + }, + "esbuild-openbsd-64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.10.tgz", + "integrity": "sha512-ftMMIwHWrnrYnvuJQRJs/Smlcb28F9ICGde/P3FUTCgDDM0N7WA0o9uOR38f5Xe2/OhNCgkjNeb7QeaE3cyWkQ==", + "dev": true, + "optional": true + }, + "esbuild-sunos-64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.10.tgz", + "integrity": "sha512-mf7hBL9Uo2gcy2r3rUFMjVpTaGpFJJE5QTDDqUFf1632FxteYANffDZmKbqX0PfeQ2XjUDE604IcE7OJeoHiyg==", + "dev": true, + "optional": true + }, + "esbuild-windows-32": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.10.tgz", + "integrity": "sha512-ttFVo+Cg8b5+qHmZHbEc8Vl17kCleHhLzgT8X04y8zudEApo0PxPg9Mz8Z2cKH1bCYlve1XL8LkyXGFjtUYeGg==", + "dev": true, + "optional": true + }, + "esbuild-windows-64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.10.tgz", + "integrity": "sha512-2H0gdsyHi5x+8lbng3hLbxDWR7mKHWh5BXZGKVG830KUmXOOWFE2YKJ4tHRkejRduOGDrBvHBriYsGtmTv3ntA==", + "dev": true, + "optional": true + }, + "esbuild-windows-arm64": { + "version": "0.15.10", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.10.tgz", + "integrity": "sha512-S+th4F+F8VLsHLR0zrUcG+Et4hx0RKgK1eyHc08kztmLOES8BWwMiaGdoW9hiXuzznXQ0I/Fg904MNbr11Nktw==", + "dev": true, + "optional": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "fraction.js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", + "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "laravel-vite-plugin": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-0.6.1.tgz", + "integrity": "sha512-L8zt+bttm6+C0mo3an5J8wRW03SsjbTEouGb3bH2jj/XclFVAX/xEUkG9efhdRHjbEH5RY6cmdJ7bmf7zqjwIQ==", + "dev": true, + "requires": { + "vite-plugin-full-reload": "^1.0.1" + } + }, + "lilconfig": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", + "integrity": "sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==", + "dev": true + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lodash.castarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz", + "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, + "mini-svg-data-uri": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", + "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", + "dev": true + }, + "minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true + }, + "nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "dev": true + }, + "node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true + }, + "object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true + }, + "postcss": { + "version": "8.4.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.18.tgz", + "integrity": "sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==", + "dev": true, + "requires": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "postcss-import": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz", + "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + } + }, + "postcss-js": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.0.tgz", + "integrity": "sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==", + "dev": true, + "requires": { + "camelcase-css": "^2.0.1" + } + }, + "postcss-load-config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "dev": true, + "requires": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + } + }, + "postcss-nested": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-5.0.6.tgz", + "integrity": "sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==", + "dev": true, + "requires": { + "postcss-selector-parser": "^6.0.6" + } + }, + "postcss-selector-parser": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true + }, + "read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "requires": { + "pify": "^2.3.0" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rollup": { + "version": "2.78.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz", + "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "tailwindcss": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.1.8.tgz", + "integrity": "sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==", + "dev": true, + "requires": { + "arg": "^5.0.2", + "chokidar": "^3.5.3", + "color-name": "^1.1.4", + "detective": "^5.2.1", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.2.11", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "lilconfig": "^2.0.6", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.0.0", + "postcss": "^8.4.14", + "postcss-import": "^14.1.0", + "postcss-js": "^4.0.0", + "postcss-load-config": "^3.1.4", + "postcss-nested": "5.0.6", + "postcss-selector-parser": "^6.0.10", + "postcss-value-parser": "^4.2.0", + "quick-lru": "^5.1.1", + "resolve": "^1.22.1" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "vite": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.8.tgz", + "integrity": "sha512-m7jJe3nufUbuOfotkntGFupinL/fmuTNuQmiVE7cH2IZMuf4UbfbGYMUT3jVWgGYuRVLY9j8NnrRqgw5rr5QTg==", + "dev": true, + "requires": { + "esbuild": "^0.15.9", + "fsevents": "~2.3.2", + "postcss": "^8.4.16", + "resolve": "^1.22.1", + "rollup": "~2.78.0" + } + }, + "vite-plugin-full-reload": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vite-plugin-full-reload/-/vite-plugin-full-reload-1.0.4.tgz", + "integrity": "sha512-9WejQII6zJ++m/YE173Zvl2jq4cqa404KNrVT+JDzDnqaGRq5UvOvA48fnsSWPIMXFV7S0dq5+sZqcSB+tKBgA==", + "dev": true, + "requires": { + "picocolors": "^1.0.0", + "picomatch": "^2.3.1" + } + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true + } + } +} diff --git a/package.json b/package.json index 6d30231..b0c71ec 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,15 @@ "build": "vite build" }, "devDependencies": { + "@tailwindcss/forms": "^0.5.2", + "@tailwindcss/typography": "^0.5.0", + "alpinejs": "^3.0.6", + "autoprefixer": "^10.4.7", "axios": "^0.27", "laravel-vite-plugin": "^0.6.0", "lodash": "^4.17.19", - "postcss": "^8.1.14", + "postcss": "^8.4.14", + "tailwindcss": "^3.1.0", "vite": "^3.0.0" } } diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..67cdf1a --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/resources/css/app.css b/resources/css/app.css index e69de29..b5c61c9 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/resources/js/app.js b/resources/js/app.js index e59d6a0..a8093be 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1 +1,7 @@ import './bootstrap'; + +import Alpine from 'alpinejs'; + +window.Alpine = Alpine; + +Alpine.start(); diff --git a/resources/markdown/policy.md b/resources/markdown/policy.md new file mode 100644 index 0000000..ff7dbea --- /dev/null +++ b/resources/markdown/policy.md @@ -0,0 +1,3 @@ +# Privacy Policy + +Edit this file to define the privacy policy for your application. diff --git a/resources/markdown/terms.md b/resources/markdown/terms.md new file mode 100644 index 0000000..bf2ace7 --- /dev/null +++ b/resources/markdown/terms.md @@ -0,0 +1,3 @@ +# Terms of Service + +Edit this file to define the terms of service for your application. diff --git a/resources/views/api/api-token-manager.blade.php b/resources/views/api/api-token-manager.blade.php new file mode 100644 index 0000000..1391fb7 --- /dev/null +++ b/resources/views/api/api-token-manager.blade.php @@ -0,0 +1,169 @@ +
+ + + + {{ __('Create API Token') }} + + + + {{ __('API tokens allow third-party services to authenticate with our application on your behalf.') }} + + + + +
+ + + +
+ + + @if (Laravel\Jetstream\Jetstream::hasPermissions()) +
+ + +
+ @foreach (Laravel\Jetstream\Jetstream::$permissions as $permission) + + @endforeach +
+
+ @endif +
+ + + + {{ __('Created.') }} + + + + {{ __('Create') }} + + +
+ + @if ($this->user->tokens->isNotEmpty()) + + + +
+ + + {{ __('Manage API Tokens') }} + + + + {{ __('You may delete any of your existing tokens if they are no longer needed.') }} + + + + +
+ @foreach ($this->user->tokens->sortBy('name') as $token) +
+
+ {{ $token->name }} +
+ +
+ @if ($token->last_used_at) +
+ {{ __('Last used') }} {{ $token->last_used_at->diffForHumans() }} +
+ @endif + + @if (Laravel\Jetstream\Jetstream::hasPermissions()) + + @endif + + +
+
+ @endforeach +
+
+
+
+ @endif + + + + + {{ __('API Token') }} + + + +
+ {{ __('Please copy your new API token. For your security, it won\'t be shown again.') }} +
+ + +
+ + + + {{ __('Close') }} + + +
+ + + + + {{ __('API Token Permissions') }} + + + +
+ @foreach (Laravel\Jetstream\Jetstream::$permissions as $permission) + + @endforeach +
+
+ + + + {{ __('Cancel') }} + + + + {{ __('Save') }} + + +
+ + + + + {{ __('Delete API Token') }} + + + + {{ __('Are you sure you would like to delete this API token?') }} + + + + + {{ __('Cancel') }} + + + + {{ __('Delete') }} + + + +
diff --git a/resources/views/api/index.blade.php b/resources/views/api/index.blade.php new file mode 100644 index 0000000..d15b6a3 --- /dev/null +++ b/resources/views/api/index.blade.php @@ -0,0 +1,13 @@ + + +

+ {{ __('API Tokens') }} +

+
+ +
+
+ @livewire('api.api-token-manager') +
+
+
diff --git a/resources/views/auth/confirm-password.blade.php b/resources/views/auth/confirm-password.blade.php new file mode 100644 index 0000000..d87049a --- /dev/null +++ b/resources/views/auth/confirm-password.blade.php @@ -0,0 +1,28 @@ + + + + + + +
+ {{ __('This is a secure area of the application. Please confirm your password before continuing.') }} +
+ + + +
+ @csrf + +
+ + +
+ +
+ + {{ __('Confirm') }} + +
+
+
+
diff --git a/resources/views/auth/forgot-password.blade.php b/resources/views/auth/forgot-password.blade.php new file mode 100644 index 0000000..6af4ab6 --- /dev/null +++ b/resources/views/auth/forgot-password.blade.php @@ -0,0 +1,34 @@ + + + + + + +
+ {{ __('Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.') }} +
+ + @if (session('status')) +
+ {{ session('status') }} +
+ @endif + + + +
+ @csrf + +
+ + +
+ +
+ + {{ __('Email Password Reset Link') }} + +
+
+
+
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php new file mode 100644 index 0000000..e62d8d3 --- /dev/null +++ b/resources/views/auth/login.blade.php @@ -0,0 +1,48 @@ + + + + + + + + + @if (session('status')) +
+ {{ session('status') }} +
+ @endif + +
+ @csrf + +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ @if (Route::has('password.request')) + + {{ __('Forgot your password?') }} + + @endif + + + {{ __('Log in') }} + +
+
+
+
diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php new file mode 100644 index 0000000..d0a58ea --- /dev/null +++ b/resources/views/auth/register.blade.php @@ -0,0 +1,60 @@ + + + + + + + + +
+ @csrf + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + @if (Laravel\Jetstream\Jetstream::hasTermsAndPrivacyPolicyFeature()) +
+ +
+ + +
+ {!! __('I agree to the :terms_of_service and :privacy_policy', [ + 'terms_of_service' => ''.__('Terms of Service').'', + 'privacy_policy' => ''.__('Privacy Policy').'', + ]) !!} +
+
+
+
+ @endif + +
+ + {{ __('Already registered?') }} + + + + {{ __('Register') }} + +
+
+
+
diff --git a/resources/views/auth/reset-password.blade.php b/resources/views/auth/reset-password.blade.php new file mode 100644 index 0000000..36a9f65 --- /dev/null +++ b/resources/views/auth/reset-password.blade.php @@ -0,0 +1,36 @@ + + + + + + + + +
+ @csrf + + + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + {{ __('Reset Password') }} + +
+
+
+
diff --git a/resources/views/auth/two-factor-challenge.blade.php b/resources/views/auth/two-factor-challenge.blade.php new file mode 100644 index 0000000..6d54913 --- /dev/null +++ b/resources/views/auth/two-factor-challenge.blade.php @@ -0,0 +1,57 @@ + + + + + + +
+
+ {{ __('Please confirm access to your account by entering the authentication code provided by your authenticator application.') }} +
+ +
+ {{ __('Please confirm access to your account by entering one of your emergency recovery codes.') }} +
+ + + +
+ @csrf + +
+ + +
+ +
+ + +
+ +
+ + + + + + {{ __('Log in') }} + +
+
+
+
+
diff --git a/resources/views/auth/verify-email.blade.php b/resources/views/auth/verify-email.blade.php new file mode 100644 index 0000000..7e61646 --- /dev/null +++ b/resources/views/auth/verify-email.blade.php @@ -0,0 +1,45 @@ + + + + + + +
+ {{ __('Before continuing, could you verify your email address by clicking on the link we just emailed to you? If you didn\'t receive the email, we will gladly send you another.') }} +
+ + @if (session('status') == 'verification-link-sent') +
+ {{ __('A new verification link has been sent to the email address you provided in your profile settings.') }} +
+ @endif + +
+
+ @csrf + +
+ + {{ __('Resend Verification Email') }} + +
+
+ +
+ + {{ __('Edit Profile') }} + +
+ @csrf + + +
+
+
+
+
diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php new file mode 100644 index 0000000..0d0c9c9 --- /dev/null +++ b/resources/views/dashboard.blade.php @@ -0,0 +1,15 @@ + + +

+ {{ __('Dashboard') }} +

+
+ +
+
+
+ +
+
+
+
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php new file mode 100644 index 0000000..7fd3e8f --- /dev/null +++ b/resources/views/layouts/app.blade.php @@ -0,0 +1,44 @@ + + + + + + + + {{ config('app.name', 'Laravel') }} + + + + + + @vite(['resources/css/app.css', 'resources/js/app.js']) + + + @livewireStyles + + + + +
+ @livewire('navigation-menu') + + + @if (isset($header)) +
+
+ {{ $header }} +
+
+ @endif + + +
+ {{ $slot }} +
+
+ + @stack('modals') + + @livewireScripts + + diff --git a/resources/views/layouts/guest.blade.php b/resources/views/layouts/guest.blade.php new file mode 100644 index 0000000..a5ec1c3 --- /dev/null +++ b/resources/views/layouts/guest.blade.php @@ -0,0 +1,21 @@ + + + + + + + + {{ config('app.name', 'Laravel') }} + + + + + + @vite(['resources/css/app.css', 'resources/js/app.js']) + + +
+ {{ $slot }} +
+ + diff --git a/resources/views/navigation-menu.blade.php b/resources/views/navigation-menu.blade.php new file mode 100644 index 0000000..9ce13ca --- /dev/null +++ b/resources/views/navigation-menu.blade.php @@ -0,0 +1,215 @@ + diff --git a/resources/views/policy.blade.php b/resources/views/policy.blade.php new file mode 100644 index 0000000..17e1359 --- /dev/null +++ b/resources/views/policy.blade.php @@ -0,0 +1,13 @@ + +
+
+
+ +
+ +
+ {!! $policy !!} +
+
+
+
diff --git a/resources/views/profile/delete-user-form.blade.php b/resources/views/profile/delete-user-form.blade.php new file mode 100644 index 0000000..3acdb30 --- /dev/null +++ b/resources/views/profile/delete-user-form.blade.php @@ -0,0 +1,52 @@ + + + {{ __('Delete Account') }} + + + + {{ __('Permanently delete your account.') }} + + + +
+ {{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.') }} +
+ +
+ + {{ __('Delete Account') }} + +
+ + + + + {{ __('Delete Account') }} + + + + {{ __('Are you sure you want to delete your account? Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.') }} + +
+ + + +
+
+ + + + {{ __('Cancel') }} + + + + {{ __('Delete Account') }} + + +
+
+
diff --git a/resources/views/profile/logout-other-browser-sessions-form.blade.php b/resources/views/profile/logout-other-browser-sessions-form.blade.php new file mode 100644 index 0000000..c20b465 --- /dev/null +++ b/resources/views/profile/logout-other-browser-sessions-form.blade.php @@ -0,0 +1,97 @@ + + + {{ __('Browser Sessions') }} + + + + {{ __('Manage and log out your active sessions on other browsers and devices.') }} + + + +
+ {{ __('If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.') }} +
+ + @if (count($this->sessions) > 0) +
+ + @foreach ($this->sessions as $session) +
+
+ @if ($session->agent->isDesktop()) + + + + @else + + + + @endif +
+ +
+
+ {{ $session->agent->platform() ? $session->agent->platform() : 'Unknown' }} - {{ $session->agent->browser() ? $session->agent->browser() : 'Unknown' }} +
+ +
+
+ {{ $session->ip_address }}, + + @if ($session->is_current_device) + {{ __('This device') }} + @else + {{ __('Last active') }} {{ $session->last_active }} + @endif +
+
+
+
+ @endforeach +
+ @endif + +
+ + {{ __('Log Out Other Browser Sessions') }} + + + + {{ __('Done.') }} + +
+ + + + + {{ __('Log Out Other Browser Sessions') }} + + + + {{ __('Please enter your password to confirm you would like to log out of your other browser sessions across all of your devices.') }} + +
+ + + +
+
+ + + + {{ __('Cancel') }} + + + + {{ __('Log Out Other Browser Sessions') }} + + +
+
+
diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php new file mode 100644 index 0000000..b8a7995 --- /dev/null +++ b/resources/views/profile/show.blade.php @@ -0,0 +1,45 @@ + + +

+ {{ __('Profile') }} +

+
+ +
+
+ @if (Laravel\Fortify\Features::canUpdateProfileInformation()) + @livewire('profile.update-profile-information-form') + + + @endif + + @if (Laravel\Fortify\Features::enabled(Laravel\Fortify\Features::updatePasswords())) +
+ @livewire('profile.update-password-form') +
+ + + @endif + + @if (Laravel\Fortify\Features::canManageTwoFactorAuthentication()) +
+ @livewire('profile.two-factor-authentication-form') +
+ + + @endif + +
+ @livewire('profile.logout-other-browser-sessions-form') +
+ + @if (Laravel\Jetstream\Jetstream::hasAccountDeletionFeatures()) + + +
+ @livewire('profile.delete-user-form') +
+ @endif +
+
+
diff --git a/resources/views/profile/two-factor-authentication-form.blade.php b/resources/views/profile/two-factor-authentication-form.blade.php new file mode 100644 index 0000000..5dc8fbe --- /dev/null +++ b/resources/views/profile/two-factor-authentication-form.blade.php @@ -0,0 +1,124 @@ + + + {{ __('Two Factor Authentication') }} + + + + {{ __('Add additional security to your account using two factor authentication.') }} + + + +

+ @if ($this->enabled) + @if ($showingConfirmation) + {{ __('Finish enabling two factor authentication.') }} + @else + {{ __('You have enabled two factor authentication.') }} + @endif + @else + {{ __('You have not enabled two factor authentication.') }} + @endif +

+ +
+

+ {{ __('When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone\'s Google Authenticator application.') }} +

+
+ + @if ($this->enabled) + @if ($showingQrCode) +
+

+ @if ($showingConfirmation) + {{ __('To finish enabling two factor authentication, scan the following QR code using your phone\'s authenticator application or enter the setup key and provide the generated OTP code.') }} + @else + {{ __('Two factor authentication is now enabled. Scan the following QR code using your phone\'s authenticator application or enter the setup key.') }} + @endif +

+
+ +
+ {!! $this->user->twoFactorQrCodeSvg() !!} +
+ +
+

+ {{ __('Setup Key') }}: {{ decrypt($this->user->two_factor_secret) }} +

+
+ + @if ($showingConfirmation) +
+ + + + + +
+ @endif + @endif + + @if ($showingRecoveryCodes) +
+

+ {{ __('Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost.') }} +

+
+ +
+ @foreach (json_decode(decrypt($this->user->two_factor_recovery_codes), true) as $code) +
{{ $code }}
+ @endforeach +
+ @endif + @endif + +
+ @if (! $this->enabled) + + + {{ __('Enable') }} + + + @else + @if ($showingRecoveryCodes) + + + {{ __('Regenerate Recovery Codes') }} + + + @elseif ($showingConfirmation) + + + {{ __('Confirm') }} + + + @else + + + {{ __('Show Recovery Codes') }} + + + @endif + + @if ($showingConfirmation) + + + {{ __('Cancel') }} + + + @else + + + {{ __('Disable') }} + + + @endif + + @endif +
+
+
diff --git a/resources/views/profile/update-password-form.blade.php b/resources/views/profile/update-password-form.blade.php new file mode 100644 index 0000000..b536005 --- /dev/null +++ b/resources/views/profile/update-password-form.blade.php @@ -0,0 +1,39 @@ + + + {{ __('Update Password') }} + + + + {{ __('Ensure your account is using a long, random password to stay secure.') }} + + + +
+ + + +
+ +
+ + + +
+ +
+ + + +
+
+ + + + {{ __('Saved.') }} + + + + {{ __('Save') }} + + +
diff --git a/resources/views/profile/update-profile-information-form.blade.php b/resources/views/profile/update-profile-information-form.blade.php new file mode 100644 index 0000000..c104ddb --- /dev/null +++ b/resources/views/profile/update-profile-information-form.blade.php @@ -0,0 +1,95 @@ + + + {{ __('Profile Information') }} + + + + {{ __('Update your account\'s profile information and email address.') }} + + + + + @if (Laravel\Jetstream\Jetstream::managesProfilePhotos()) +
+ + + + + + +
+ {{ $this->user->name }} +
+ + + + + + {{ __('Select A New Photo') }} + + + @if ($this->user->profile_photo_path) + + {{ __('Remove Photo') }} + + @endif + + +
+ @endif + + +
+ + + +
+ + +
+ + + + + @if (Laravel\Fortify\Features::enabled(Laravel\Fortify\Features::emailVerification()) && ! $this->user->hasVerifiedEmail()) +

+ {{ __('Your email address is unverified.') }} + + +

+ + @if ($this->verificationLinkSent) +

+ {{ __('A new verification link has been sent to your email address.') }} +

+ @endif + @endif +
+
+ + + + {{ __('Saved.') }} + + + + {{ __('Save') }} + + +
diff --git a/resources/views/terms.blade.php b/resources/views/terms.blade.php new file mode 100644 index 0000000..bb8b193 --- /dev/null +++ b/resources/views/terms.blade.php @@ -0,0 +1,13 @@ + +
+
+
+ +
+ +
+ {!! $terms !!} +
+
+
+
diff --git a/resources/views/vendor/jetstream/components/action-message.blade.php b/resources/views/vendor/jetstream/components/action-message.blade.php new file mode 100644 index 0000000..39e6eed --- /dev/null +++ b/resources/views/vendor/jetstream/components/action-message.blade.php @@ -0,0 +1,10 @@ +@props(['on']) + +
merge(['class' => 'text-sm text-gray-600']) }}> + {{ $slot->isEmpty() ? 'Saved.' : $slot }} +
diff --git a/resources/views/vendor/jetstream/components/action-section.blade.php b/resources/views/vendor/jetstream/components/action-section.blade.php new file mode 100644 index 0000000..4ab1ce9 --- /dev/null +++ b/resources/views/vendor/jetstream/components/action-section.blade.php @@ -0,0 +1,12 @@ +
merge(['class' => 'md:grid md:grid-cols-3 md:gap-6']) }}> + + {{ $title }} + {{ $description }} + + +
+
+ {{ $content }} +
+
+
diff --git a/resources/views/vendor/jetstream/components/application-logo.blade.php b/resources/views/vendor/jetstream/components/application-logo.blade.php new file mode 100644 index 0000000..226a0dc --- /dev/null +++ b/resources/views/vendor/jetstream/components/application-logo.blade.php @@ -0,0 +1,5 @@ + + + + + diff --git a/resources/views/vendor/jetstream/components/application-mark.blade.php b/resources/views/vendor/jetstream/components/application-mark.blade.php new file mode 100644 index 0000000..182054e --- /dev/null +++ b/resources/views/vendor/jetstream/components/application-mark.blade.php @@ -0,0 +1,4 @@ + + + + diff --git a/resources/views/vendor/jetstream/components/authentication-card-logo.blade.php b/resources/views/vendor/jetstream/components/authentication-card-logo.blade.php new file mode 100644 index 0000000..0b59654 --- /dev/null +++ b/resources/views/vendor/jetstream/components/authentication-card-logo.blade.php @@ -0,0 +1,6 @@ + + + + + + diff --git a/resources/views/vendor/jetstream/components/authentication-card.blade.php b/resources/views/vendor/jetstream/components/authentication-card.blade.php new file mode 100644 index 0000000..71235cf --- /dev/null +++ b/resources/views/vendor/jetstream/components/authentication-card.blade.php @@ -0,0 +1,9 @@ +
+
+ {{ $logo }} +
+ +
+ {{ $slot }} +
+
diff --git a/resources/views/vendor/jetstream/components/banner.blade.php b/resources/views/vendor/jetstream/components/banner.blade.php new file mode 100644 index 0000000..74f53bc --- /dev/null +++ b/resources/views/vendor/jetstream/components/banner.blade.php @@ -0,0 +1,46 @@ +@props(['style' => session('flash.bannerStyle', 'success'), 'message' => session('flash.banner')]) + +
+
+
+
+ + + + + + + + + + + + +

+
+ +
+ +
+
+
+
diff --git a/resources/views/vendor/jetstream/components/button.blade.php b/resources/views/vendor/jetstream/components/button.blade.php new file mode 100644 index 0000000..ff1fed5 --- /dev/null +++ b/resources/views/vendor/jetstream/components/button.blade.php @@ -0,0 +1,3 @@ + diff --git a/resources/views/vendor/jetstream/components/checkbox.blade.php b/resources/views/vendor/jetstream/components/checkbox.blade.php new file mode 100644 index 0000000..fb43fdc --- /dev/null +++ b/resources/views/vendor/jetstream/components/checkbox.blade.php @@ -0,0 +1 @@ +merge(['class' => 'rounded border-gray-300 text-indigo-600 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50']) !!}> diff --git a/resources/views/vendor/jetstream/components/confirmation-modal.blade.php b/resources/views/vendor/jetstream/components/confirmation-modal.blade.php new file mode 100644 index 0000000..ee4896c --- /dev/null +++ b/resources/views/vendor/jetstream/components/confirmation-modal.blade.php @@ -0,0 +1,27 @@ +@props(['id' => null, 'maxWidth' => null]) + + +
+
+
+ + + +
+ +
+

+ {{ $title }} +

+ +
+ {{ $content }} +
+
+
+
+ +
+ {{ $footer }} +
+
diff --git a/resources/views/vendor/jetstream/components/confirms-password.blade.php b/resources/views/vendor/jetstream/components/confirms-password.blade.php new file mode 100644 index 0000000..5341185 --- /dev/null +++ b/resources/views/vendor/jetstream/components/confirms-password.blade.php @@ -0,0 +1,46 @@ +@props(['title' => __('Confirm Password'), 'content' => __('For your security, please confirm your password to continue.'), 'button' => __('Confirm')]) + +@php + $confirmableId = md5($attributes->wire('then')); +@endphp + +wire('then') }} + x-data + x-ref="span" + x-on:click="$wire.startConfirmingPassword('{{ $confirmableId }}')" + x-on:password-confirmed.window="setTimeout(() => $event.detail.id === '{{ $confirmableId }}' && $refs.span.dispatchEvent(new CustomEvent('then', { bubbles: false })), 250);" +> + {{ $slot }} + + +@once + + + {{ $title }} + + + + {{ $content }} + +
+ + + +
+
+ + + + {{ __('Cancel') }} + + + + {{ $button }} + + +
+@endonce diff --git a/resources/views/vendor/jetstream/components/danger-button.blade.php b/resources/views/vendor/jetstream/components/danger-button.blade.php new file mode 100644 index 0000000..876b3e5 --- /dev/null +++ b/resources/views/vendor/jetstream/components/danger-button.blade.php @@ -0,0 +1,3 @@ + diff --git a/resources/views/vendor/jetstream/components/dialog-modal.blade.php b/resources/views/vendor/jetstream/components/dialog-modal.blade.php new file mode 100644 index 0000000..0935941 --- /dev/null +++ b/resources/views/vendor/jetstream/components/dialog-modal.blade.php @@ -0,0 +1,17 @@ +@props(['id' => null, 'maxWidth' => null]) + + +
+
+ {{ $title }} +
+ +
+ {{ $content }} +
+
+ +
+ {{ $footer }} +
+
diff --git a/resources/views/vendor/jetstream/components/dropdown-link.blade.php b/resources/views/vendor/jetstream/components/dropdown-link.blade.php new file mode 100644 index 0000000..6b608ff --- /dev/null +++ b/resources/views/vendor/jetstream/components/dropdown-link.blade.php @@ -0,0 +1 @@ +merge(['class' => 'block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition']) }}>{{ $slot }} diff --git a/resources/views/vendor/jetstream/components/dropdown.blade.php b/resources/views/vendor/jetstream/components/dropdown.blade.php new file mode 100644 index 0000000..5fd9f91 --- /dev/null +++ b/resources/views/vendor/jetstream/components/dropdown.blade.php @@ -0,0 +1,47 @@ +@props(['align' => 'right', 'width' => '48', 'contentClasses' => 'py-1 bg-white', 'dropdownClasses' => '']) + +@php +switch ($align) { + case 'left': + $alignmentClasses = 'origin-top-left left-0'; + break; + case 'top': + $alignmentClasses = 'origin-top'; + break; + case 'none': + case 'false': + $alignmentClasses = ''; + break; + case 'right': + default: + $alignmentClasses = 'origin-top-right right-0'; + break; +} + +switch ($width) { + case '48': + $width = 'w-48'; + break; +} +@endphp + +
+
+ {{ $trigger }} +
+ + +
diff --git a/resources/views/vendor/jetstream/components/form-section.blade.php b/resources/views/vendor/jetstream/components/form-section.blade.php new file mode 100644 index 0000000..791387b --- /dev/null +++ b/resources/views/vendor/jetstream/components/form-section.blade.php @@ -0,0 +1,24 @@ +@props(['submit']) + +
merge(['class' => 'md:grid md:grid-cols-3 md:gap-6']) }}> + + {{ $title }} + {{ $description }} + + +
+
+
+
+ {{ $form }} +
+
+ + @if (isset($actions)) +
+ {{ $actions }} +
+ @endif +
+
+
diff --git a/resources/views/vendor/jetstream/components/input-error.blade.php b/resources/views/vendor/jetstream/components/input-error.blade.php new file mode 100644 index 0000000..b5ad968 --- /dev/null +++ b/resources/views/vendor/jetstream/components/input-error.blade.php @@ -0,0 +1,5 @@ +@props(['for']) + +@error($for) +

merge(['class' => 'text-sm text-red-600']) }}>{{ $message }}

+@enderror diff --git a/resources/views/vendor/jetstream/components/input.blade.php b/resources/views/vendor/jetstream/components/input.blade.php new file mode 100644 index 0000000..78b18ee --- /dev/null +++ b/resources/views/vendor/jetstream/components/input.blade.php @@ -0,0 +1,3 @@ +@props(['disabled' => false]) + +merge(['class' => 'border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm']) !!}> diff --git a/resources/views/vendor/jetstream/components/label.blade.php b/resources/views/vendor/jetstream/components/label.blade.php new file mode 100644 index 0000000..1cc65e2 --- /dev/null +++ b/resources/views/vendor/jetstream/components/label.blade.php @@ -0,0 +1,5 @@ +@props(['value']) + + diff --git a/resources/views/vendor/jetstream/components/modal.blade.php b/resources/views/vendor/jetstream/components/modal.blade.php new file mode 100644 index 0000000..4acdbf0 --- /dev/null +++ b/resources/views/vendor/jetstream/components/modal.blade.php @@ -0,0 +1,68 @@ +@props(['id', 'maxWidth']) + +@php +$id = $id ?? md5($attributes->wire('model')); + +$maxWidth = [ + 'sm' => 'sm:max-w-sm', + 'md' => 'sm:max-w-md', + 'lg' => 'sm:max-w-lg', + 'xl' => 'sm:max-w-xl', + '2xl' => 'sm:max-w-2xl', +][$maxWidth ?? '2xl']; +@endphp + + diff --git a/resources/views/vendor/jetstream/components/nav-link.blade.php b/resources/views/vendor/jetstream/components/nav-link.blade.php new file mode 100644 index 0000000..7092642 --- /dev/null +++ b/resources/views/vendor/jetstream/components/nav-link.blade.php @@ -0,0 +1,11 @@ +@props(['active']) + +@php +$classes = ($active ?? false) + ? 'inline-flex items-center px-1 pt-1 border-b-2 border-indigo-400 text-sm font-medium leading-5 text-gray-900 focus:outline-none focus:border-indigo-700 transition' + : 'inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-500 hover:text-gray-700 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-300 transition'; +@endphp + +merge(['class' => $classes]) }}> + {{ $slot }} + diff --git a/resources/views/vendor/jetstream/components/responsive-nav-link.blade.php b/resources/views/vendor/jetstream/components/responsive-nav-link.blade.php new file mode 100644 index 0000000..5e7987f --- /dev/null +++ b/resources/views/vendor/jetstream/components/responsive-nav-link.blade.php @@ -0,0 +1,11 @@ +@props(['active']) + +@php +$classes = ($active ?? false) + ? 'block pl-3 pr-4 py-2 border-l-4 border-indigo-400 text-base font-medium text-indigo-700 bg-indigo-50 focus:outline-none focus:text-indigo-800 focus:bg-indigo-100 focus:border-indigo-700 transition' + : 'block pl-3 pr-4 py-2 border-l-4 border-transparent text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition'; +@endphp + +merge(['class' => $classes]) }}> + {{ $slot }} + diff --git a/resources/views/vendor/jetstream/components/secondary-button.blade.php b/resources/views/vendor/jetstream/components/secondary-button.blade.php new file mode 100644 index 0000000..e9dc695 --- /dev/null +++ b/resources/views/vendor/jetstream/components/secondary-button.blade.php @@ -0,0 +1,3 @@ + diff --git a/resources/views/vendor/jetstream/components/section-border.blade.php b/resources/views/vendor/jetstream/components/section-border.blade.php new file mode 100644 index 0000000..414ade6 --- /dev/null +++ b/resources/views/vendor/jetstream/components/section-border.blade.php @@ -0,0 +1,5 @@ + diff --git a/resources/views/vendor/jetstream/components/section-title.blade.php b/resources/views/vendor/jetstream/components/section-title.blade.php new file mode 100644 index 0000000..72e5193 --- /dev/null +++ b/resources/views/vendor/jetstream/components/section-title.blade.php @@ -0,0 +1,13 @@ +
+
+

{{ $title }}

+ +

+ {{ $description }} +

+
+ +
+ {{ $aside ?? '' }} +
+
diff --git a/resources/views/vendor/jetstream/components/switchable-team.blade.php b/resources/views/vendor/jetstream/components/switchable-team.blade.php new file mode 100644 index 0000000..c621adf --- /dev/null +++ b/resources/views/vendor/jetstream/components/switchable-team.blade.php @@ -0,0 +1,19 @@ +@props(['team', 'component' => 'jet-dropdown-link']) + +
+ @method('PUT') + @csrf + + + + + +
+ @if (Auth::user()->isCurrentTeam($team)) + + @endif + +
{{ $team->name }}
+
+
+
diff --git a/resources/views/vendor/jetstream/components/validation-errors.blade.php b/resources/views/vendor/jetstream/components/validation-errors.blade.php new file mode 100644 index 0000000..ef753f5 --- /dev/null +++ b/resources/views/vendor/jetstream/components/validation-errors.blade.php @@ -0,0 +1,11 @@ +@if ($errors->any()) +
+
{{ __('Whoops! Something went wrong.') }}
+ +
    + @foreach ($errors->all() as $error) +
  • {{ $error }}
  • + @endforeach +
+
+@endif diff --git a/resources/views/vendor/jetstream/components/welcome.blade.php b/resources/views/vendor/jetstream/components/welcome.blade.php new file mode 100644 index 0000000..10bee57 --- /dev/null +++ b/resources/views/vendor/jetstream/components/welcome.blade.php @@ -0,0 +1,90 @@ +
+
+ +
+ +
+ Welcome to your Jetstream application! +
+ +
+ Laravel Jetstream provides a beautiful, robust starting point for your next Laravel application. Laravel is designed + to help you build your application using a development environment that is simple, powerful, and enjoyable. We believe + you should love expressing your creativity through programming, so we have spent time carefully crafting the Laravel + ecosystem to be a breath of fresh air. We hope you love it. +
+
+ +
+
+ + +
+
+ Laravel has wonderful documentation covering every aspect of the framework. Whether you're new to the framework or have previous experience, we recommend reading all of the documentation from beginning to end. +
+ + +
+
Explore the documentation
+ +
+ +
+
+
+
+
+ +
+
+ + +
+ +
+
+ Laracasts offers thousands of video tutorials on Laravel, PHP, and JavaScript development. Check them out, see for yourself, and massively level up your development skills in the process. +
+ + +
+
Start watching Laracasts
+ +
+ +
+
+
+
+
+ +
+
+ + +
+ +
+
+ Laravel Jetstream is built with Tailwind, an amazing utility first CSS framework that doesn't get in your way. You'll be amazed how easily you can build and maintain fresh, modern designs with this wonderful framework at your fingertips. +
+
+
+ +
+
+ +
Authentication
+
+ +
+
+ Authentication and registration views are included with Laravel Jetstream, as well as support for user email verification and resetting forgotten passwords. So, you're free to get started what matters most: building your application. +
+
+
+
diff --git a/resources/views/vendor/jetstream/mail/team-invitation.blade.php b/resources/views/vendor/jetstream/mail/team-invitation.blade.php new file mode 100644 index 0000000..1701212 --- /dev/null +++ b/resources/views/vendor/jetstream/mail/team-invitation.blade.php @@ -0,0 +1,23 @@ +@component('mail::message') +{{ __('You have been invited to join the :team team!', ['team' => $invitation->team->name]) }} + +@if (Laravel\Fortify\Features::enabled(Laravel\Fortify\Features::registration())) +{{ __('If you do not have an account, you may create one by clicking the button below. After creating an account, you may click the invitation acceptance button in this email to accept the team invitation:') }} + +@component('mail::button', ['url' => route('register')]) +{{ __('Create Account') }} +@endcomponent + +{{ __('If you already have an account, you may accept this invitation by clicking the button below:') }} + +@else +{{ __('You may accept this invitation by clicking the button below:') }} +@endif + + +@component('mail::button', ['url' => $acceptUrl]) +{{ __('Accept Invitation') }} +@endcomponent + +{{ __('If you did not expect to receive an invitation to this team, you may discard this email.') }} +@endcomponent diff --git a/routes/web.php b/routes/web.php index 4f02e0e..8b5bf85 100644 --- a/routes/web.php +++ b/routes/web.php @@ -15,5 +15,15 @@ | */ +Route::middleware([ + 'auth:sanctum', + config('jetstream.auth_session'), + 'verified' +])->group(function () { + Route::get('/dashboard', function () { + return view('dashboard'); + })->name('dashboard'); +}); + Route::any('{uri?}',[RequestController::class,'main']) ->where('uri','.*'); diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..721525b --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,21 @@ +const defaultTheme = require('tailwindcss/defaultTheme'); + +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php', + './vendor/laravel/jetstream/**/*.blade.php', + './storage/framework/views/*.php', + './resources/views/**/*.blade.php', + ], + + theme: { + extend: { + fontFamily: { + sans: ['Nunito', ...defaultTheme.fontFamily.sans], + }, + }, + }, + + plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')], +}; diff --git a/tests/Feature/ApiTokenPermissionsTest.php b/tests/Feature/ApiTokenPermissionsTest.php new file mode 100644 index 0000000..5fbd909 --- /dev/null +++ b/tests/Feature/ApiTokenPermissionsTest.php @@ -0,0 +1,45 @@ +markTestSkipped('API support is not enabled.'); + } + + $this->actingAs($user = User::factory()->withPersonalTeam()->create()); + + $token = $user->tokens()->create([ + 'name' => 'Test Token', + 'token' => Str::random(40), + 'abilities' => ['create', 'read'], + ]); + + Livewire::test(ApiTokenManager::class) + ->set(['managingPermissionsFor' => $token]) + ->set(['updateApiTokenForm' => [ + 'permissions' => [ + 'delete', + 'missing-permission', + ], + ]]) + ->call('updateApiToken'); + + $this->assertTrue($user->fresh()->tokens->first()->can('delete')); + $this->assertFalse($user->fresh()->tokens->first()->can('read')); + $this->assertFalse($user->fresh()->tokens->first()->can('missing-permission')); + } +} diff --git a/tests/Feature/AuthenticationTest.php b/tests/Feature/AuthenticationTest.php new file mode 100644 index 0000000..2dbceac --- /dev/null +++ b/tests/Feature/AuthenticationTest.php @@ -0,0 +1,45 @@ +get('/login'); + + $response->assertStatus(200); + } + + public function test_users_can_authenticate_using_the_login_screen() + { + $user = User::factory()->create(); + + $response = $this->post('/login', [ + 'email' => $user->email, + 'password' => 'password', + ]); + + $this->assertAuthenticated(); + $response->assertRedirect(RouteServiceProvider::HOME); + } + + public function test_users_can_not_authenticate_with_invalid_password() + { + $user = User::factory()->create(); + + $this->post('/login', [ + 'email' => $user->email, + 'password' => 'wrong-password', + ]); + + $this->assertGuest(); + } +} diff --git a/tests/Feature/BrowserSessionsTest.php b/tests/Feature/BrowserSessionsTest.php new file mode 100644 index 0000000..bac0e93 --- /dev/null +++ b/tests/Feature/BrowserSessionsTest.php @@ -0,0 +1,24 @@ +actingAs($user = User::factory()->create()); + + Livewire::test(LogoutOtherBrowserSessionsForm::class) + ->set('password', 'password') + ->call('logoutOtherBrowserSessions') + ->assertSuccessful(); + } +} diff --git a/tests/Feature/CreateApiTokenTest.php b/tests/Feature/CreateApiTokenTest.php new file mode 100644 index 0000000..465ea38 --- /dev/null +++ b/tests/Feature/CreateApiTokenTest.php @@ -0,0 +1,39 @@ +markTestSkipped('API support is not enabled.'); + } + + $this->actingAs($user = User::factory()->withPersonalTeam()->create()); + + Livewire::test(ApiTokenManager::class) + ->set(['createApiTokenForm' => [ + 'name' => 'Test Token', + 'permissions' => [ + 'read', + 'update', + ], + ]]) + ->call('createApiToken'); + + $this->assertCount(1, $user->fresh()->tokens); + $this->assertEquals('Test Token', $user->fresh()->tokens->first()->name); + $this->assertTrue($user->fresh()->tokens->first()->can('read')); + $this->assertFalse($user->fresh()->tokens->first()->can('delete')); + } +} diff --git a/tests/Feature/DeleteAccountTest.php b/tests/Feature/DeleteAccountTest.php new file mode 100644 index 0000000..7267957 --- /dev/null +++ b/tests/Feature/DeleteAccountTest.php @@ -0,0 +1,46 @@ +markTestSkipped('Account deletion is not enabled.'); + } + + $this->actingAs($user = User::factory()->create()); + + $component = Livewire::test(DeleteUserForm::class) + ->set('password', 'password') + ->call('deleteUser'); + + $this->assertNull($user->fresh()); + } + + public function test_correct_password_must_be_provided_before_account_can_be_deleted() + { + if (! Features::hasAccountDeletionFeatures()) { + return $this->markTestSkipped('Account deletion is not enabled.'); + } + + $this->actingAs($user = User::factory()->create()); + + Livewire::test(DeleteUserForm::class) + ->set('password', 'wrong-password') + ->call('deleteUser') + ->assertHasErrors(['password']); + + $this->assertNotNull($user->fresh()); + } +} diff --git a/tests/Feature/DeleteApiTokenTest.php b/tests/Feature/DeleteApiTokenTest.php new file mode 100644 index 0000000..9128862 --- /dev/null +++ b/tests/Feature/DeleteApiTokenTest.php @@ -0,0 +1,37 @@ +markTestSkipped('API support is not enabled.'); + } + + $this->actingAs($user = User::factory()->withPersonalTeam()->create()); + + $token = $user->tokens()->create([ + 'name' => 'Test Token', + 'token' => Str::random(40), + 'abilities' => ['create', 'read'], + ]); + + Livewire::test(ApiTokenManager::class) + ->set(['apiTokenIdBeingDeleted' => $token->id]) + ->call('deleteApiToken'); + + $this->assertCount(0, $user->fresh()->tokens); + } +} diff --git a/tests/Feature/EmailVerificationTest.php b/tests/Feature/EmailVerificationTest.php new file mode 100644 index 0000000..f240e12 --- /dev/null +++ b/tests/Feature/EmailVerificationTest.php @@ -0,0 +1,73 @@ +markTestSkipped('Email verification not enabled.'); + } + + $user = User::factory()->withPersonalTeam()->unverified()->create(); + + $response = $this->actingAs($user)->get('/email/verify'); + + $response->assertStatus(200); + } + + public function test_email_can_be_verified() + { + if (! Features::enabled(Features::emailVerification())) { + return $this->markTestSkipped('Email verification not enabled.'); + } + + Event::fake(); + + $user = User::factory()->unverified()->create(); + + $verificationUrl = URL::temporarySignedRoute( + 'verification.verify', + now()->addMinutes(60), + ['id' => $user->id, 'hash' => sha1($user->email)] + ); + + $response = $this->actingAs($user)->get($verificationUrl); + + Event::assertDispatched(Verified::class); + + $this->assertTrue($user->fresh()->hasVerifiedEmail()); + $response->assertRedirect(RouteServiceProvider::HOME.'?verified=1'); + } + + public function test_email_can_not_verified_with_invalid_hash() + { + if (! Features::enabled(Features::emailVerification())) { + return $this->markTestSkipped('Email verification not enabled.'); + } + + $user = User::factory()->unverified()->create(); + + $verificationUrl = URL::temporarySignedRoute( + 'verification.verify', + now()->addMinutes(60), + ['id' => $user->id, 'hash' => sha1('wrong-email')] + ); + + $this->actingAs($user)->get($verificationUrl); + + $this->assertFalse($user->fresh()->hasVerifiedEmail()); + } +} diff --git a/tests/Feature/PasswordConfirmationTest.php b/tests/Feature/PasswordConfirmationTest.php new file mode 100644 index 0000000..a31fbab --- /dev/null +++ b/tests/Feature/PasswordConfirmationTest.php @@ -0,0 +1,45 @@ +withPersonalTeam()->create(); + + $response = $this->actingAs($user)->get('/user/confirm-password'); + + $response->assertStatus(200); + } + + public function test_password_can_be_confirmed() + { + $user = User::factory()->create(); + + $response = $this->actingAs($user)->post('/user/confirm-password', [ + 'password' => 'password', + ]); + + $response->assertRedirect(); + $response->assertSessionHasNoErrors(); + } + + public function test_password_is_not_confirmed_with_invalid_password() + { + $user = User::factory()->create(); + + $response = $this->actingAs($user)->post('/user/confirm-password', [ + 'password' => 'wrong-password', + ]); + + $response->assertSessionHasErrors(); + } +} diff --git a/tests/Feature/PasswordResetTest.php b/tests/Feature/PasswordResetTest.php new file mode 100644 index 0000000..13b94b2 --- /dev/null +++ b/tests/Feature/PasswordResetTest.php @@ -0,0 +1,94 @@ +markTestSkipped('Password updates are not enabled.'); + } + + $response = $this->get('/forgot-password'); + + $response->assertStatus(200); + } + + public function test_reset_password_link_can_be_requested() + { + if (! Features::enabled(Features::resetPasswords())) { + return $this->markTestSkipped('Password updates are not enabled.'); + } + + Notification::fake(); + + $user = User::factory()->create(); + + $response = $this->post('/forgot-password', [ + 'email' => $user->email, + ]); + + Notification::assertSentTo($user, ResetPassword::class); + } + + public function test_reset_password_screen_can_be_rendered() + { + if (! Features::enabled(Features::resetPasswords())) { + return $this->markTestSkipped('Password updates are not enabled.'); + } + + Notification::fake(); + + $user = User::factory()->create(); + + $response = $this->post('/forgot-password', [ + 'email' => $user->email, + ]); + + Notification::assertSentTo($user, ResetPassword::class, function ($notification) { + $response = $this->get('/reset-password/'.$notification->token); + + $response->assertStatus(200); + + return true; + }); + } + + public function test_password_can_be_reset_with_valid_token() + { + if (! Features::enabled(Features::resetPasswords())) { + return $this->markTestSkipped('Password updates are not enabled.'); + } + + Notification::fake(); + + $user = User::factory()->create(); + + $response = $this->post('/forgot-password', [ + 'email' => $user->email, + ]); + + Notification::assertSentTo($user, ResetPassword::class, function ($notification) use ($user) { + $response = $this->post('/reset-password', [ + 'token' => $notification->token, + 'email' => $user->email, + 'password' => 'password', + 'password_confirmation' => 'password', + ]); + + $response->assertSessionHasNoErrors(); + + return true; + }); + } +} diff --git a/tests/Feature/ProfileInformationTest.php b/tests/Feature/ProfileInformationTest.php new file mode 100644 index 0000000..5487825 --- /dev/null +++ b/tests/Feature/ProfileInformationTest.php @@ -0,0 +1,36 @@ +actingAs($user = User::factory()->create()); + + $component = Livewire::test(UpdateProfileInformationForm::class); + + $this->assertEquals($user->name, $component->state['name']); + $this->assertEquals($user->email, $component->state['email']); + } + + public function test_profile_information_can_be_updated() + { + $this->actingAs($user = User::factory()->create()); + + Livewire::test(UpdateProfileInformationForm::class) + ->set('state', ['name' => 'Test Name', 'email' => 'test@example.com']) + ->call('updateProfileInformation'); + + $this->assertEquals('Test Name', $user->fresh()->name); + $this->assertEquals('test@example.com', $user->fresh()->email); + } +} diff --git a/tests/Feature/RegistrationTest.php b/tests/Feature/RegistrationTest.php new file mode 100644 index 0000000..aae144f --- /dev/null +++ b/tests/Feature/RegistrationTest.php @@ -0,0 +1,54 @@ +markTestSkipped('Registration support is not enabled.'); + } + + $response = $this->get('/register'); + + $response->assertStatus(200); + } + + public function test_registration_screen_cannot_be_rendered_if_support_is_disabled() + { + if (Features::enabled(Features::registration())) { + return $this->markTestSkipped('Registration support is enabled.'); + } + + $response = $this->get('/register'); + + $response->assertStatus(404); + } + + public function test_new_users_can_register() + { + if (! Features::enabled(Features::registration())) { + return $this->markTestSkipped('Registration support is not enabled.'); + } + + $response = $this->post('/register', [ + 'name' => 'Test User', + 'email' => 'test@example.com', + 'password' => 'password', + 'password_confirmation' => 'password', + 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature(), + ]); + + $this->assertAuthenticated(); + $response->assertRedirect(RouteServiceProvider::HOME); + } +} diff --git a/tests/Feature/TwoFactorAuthenticationSettingsTest.php b/tests/Feature/TwoFactorAuthenticationSettingsTest.php new file mode 100644 index 0000000..fa2ddd5 --- /dev/null +++ b/tests/Feature/TwoFactorAuthenticationSettingsTest.php @@ -0,0 +1,76 @@ +markTestSkipped('Two factor authentication is not enabled.'); + } + + $this->actingAs($user = User::factory()->create()); + + $this->withSession(['auth.password_confirmed_at' => time()]); + + Livewire::test(TwoFactorAuthenticationForm::class) + ->call('enableTwoFactorAuthentication'); + + $user = $user->fresh(); + + $this->assertNotNull($user->two_factor_secret); + $this->assertCount(8, $user->recoveryCodes()); + } + + public function test_recovery_codes_can_be_regenerated() + { + if (! Features::canManageTwoFactorAuthentication()) { + return $this->markTestSkipped('Two factor authentication is not enabled.'); + } + + $this->actingAs($user = User::factory()->create()); + + $this->withSession(['auth.password_confirmed_at' => time()]); + + $component = Livewire::test(TwoFactorAuthenticationForm::class) + ->call('enableTwoFactorAuthentication') + ->call('regenerateRecoveryCodes'); + + $user = $user->fresh(); + + $component->call('regenerateRecoveryCodes'); + + $this->assertCount(8, $user->recoveryCodes()); + $this->assertCount(8, array_diff($user->recoveryCodes(), $user->fresh()->recoveryCodes())); + } + + public function test_two_factor_authentication_can_be_disabled() + { + if (! Features::canManageTwoFactorAuthentication()) { + return $this->markTestSkipped('Two factor authentication is not enabled.'); + } + + $this->actingAs($user = User::factory()->create()); + + $this->withSession(['auth.password_confirmed_at' => time()]); + + $component = Livewire::test(TwoFactorAuthenticationForm::class) + ->call('enableTwoFactorAuthentication'); + + $this->assertNotNull($user->fresh()->two_factor_secret); + + $component->call('disableTwoFactorAuthentication'); + + $this->assertNull($user->fresh()->two_factor_secret); + } +} diff --git a/tests/Feature/UpdatePasswordTest.php b/tests/Feature/UpdatePasswordTest.php new file mode 100644 index 0000000..a4588c0 --- /dev/null +++ b/tests/Feature/UpdatePasswordTest.php @@ -0,0 +1,62 @@ +actingAs($user = User::factory()->create()); + + Livewire::test(UpdatePasswordForm::class) + ->set('state', [ + 'current_password' => 'password', + 'password' => 'new-password', + 'password_confirmation' => 'new-password', + ]) + ->call('updatePassword'); + + $this->assertTrue(Hash::check('new-password', $user->fresh()->password)); + } + + public function test_current_password_must_be_correct() + { + $this->actingAs($user = User::factory()->create()); + + Livewire::test(UpdatePasswordForm::class) + ->set('state', [ + 'current_password' => 'wrong-password', + 'password' => 'new-password', + 'password_confirmation' => 'new-password', + ]) + ->call('updatePassword') + ->assertHasErrors(['current_password']); + + $this->assertTrue(Hash::check('password', $user->fresh()->password)); + } + + public function test_new_passwords_must_match() + { + $this->actingAs($user = User::factory()->create()); + + Livewire::test(UpdatePasswordForm::class) + ->set('state', [ + 'current_password' => 'password', + 'password' => 'new-password', + 'password_confirmation' => 'wrong-password', + ]) + ->call('updatePassword') + ->assertHasErrors(['password']); + + $this->assertTrue(Hash::check('password', $user->fresh()->password)); + } +} diff --git a/vite.config.js b/vite.config.js index 421b569..8e5c13b 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,11 +1,17 @@ import { defineConfig } from 'vite'; -import laravel from 'laravel-vite-plugin'; +import laravel, { refreshPaths } from 'laravel-vite-plugin'; export default defineConfig({ plugins: [ laravel({ - input: ['resources/css/app.css', 'resources/js/app.js'], - refresh: true, + input: [ + 'resources/css/app.css', + 'resources/js/app.js', + ], + refresh: [ + ...refreshPaths, + 'app/Http/Livewire/**', + ], }), ], });