diff --git a/.editorconfig b/.editorconfig
index 1671c9b9d94..8f0de65c560 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -3,9 +3,9 @@ root = true
[*]
charset = utf-8
end_of_line = lf
-insert_final_newline = true
-indent_style = space
indent_size = 4
+indent_style = space
+insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
diff --git a/.env.example b/.env.example
index 9bb1bd7c48a..478972c26c6 100644
--- a/.env.example
+++ b/.env.example
@@ -29,7 +29,7 @@ REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
-MAIL_HOST=mailhog
+MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
@@ -46,7 +46,13 @@ AWS_USE_PATH_STYLE_ENDPOINT=false
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
+PUSHER_HOST=
+PUSHER_PORT=443
+PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1
-MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
-MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
+VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
+VITE_PUSHER_HOST="${PUSHER_HOST}"
+VITE_PUSHER_PORT="${PUSHER_PORT}"
+VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
+VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
diff --git a/.gitattributes b/.gitattributes
index 510d9961f10..7dbbf41a4b6 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -8,3 +8,4 @@
/.github export-ignore
CHANGELOG.md export-ignore
+.styleci.yml export-ignore
diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml
new file mode 100644
index 00000000000..9634a0edb3e
--- /dev/null
+++ b/.github/workflows/issues.yml
@@ -0,0 +1,12 @@
+name: issues
+
+on:
+ issues:
+ types: [labeled]
+
+permissions:
+ issues: write
+
+jobs:
+ help-wanted:
+ uses: laravel/.github/.github/workflows/issues.yml@main
diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml
new file mode 100644
index 00000000000..18b32b3261a
--- /dev/null
+++ b/.github/workflows/pull-requests.yml
@@ -0,0 +1,12 @@
+name: pull requests
+
+on:
+ pull_request_target:
+ types: [opened]
+
+permissions:
+ pull-requests: write
+
+jobs:
+ uneditable:
+ uses: laravel/.github/.github/workflows/pull-requests.yml@main
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 00000000000..77662031b4c
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,47 @@
+name: Tests
+
+on:
+ push:
+ branches:
+ - master
+ - '*.x'
+ pull_request:
+ schedule:
+ - cron: '0 0 * * *'
+
+permissions:
+ contents: read
+
+jobs:
+ tests:
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: true
+ matrix:
+ php: ['8.0', 8.1, 8.2]
+
+ name: PHP ${{ matrix.php }}
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
+ coverage: none
+
+ - name: Install Composer dependencies
+ run: composer install --prefer-dist --no-interaction --no-progress
+
+ - name: Copy environment file
+ run: cp .env.example .env
+
+ - name: Generate app key
+ run: php artisan key:generate
+
+ - name: Execute tests
+ run: vendor/bin/phpunit
diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml
index 0200e2b9446..ebda62069d0 100644
--- a/.github/workflows/update-changelog.yml
+++ b/.github/workflows/update-changelog.yml
@@ -1,29 +1,13 @@
-name: "Update Changelog"
+name: update changelog
on:
release:
types: [released]
+permissions: {}
+
jobs:
update:
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v2
- with:
- ref: ${{ github.ref_name }}
-
- - name: Update Changelog
- uses: stefanzweifel/changelog-updater-action@v1
- with:
- latest-version: ${{ github.event.release.tag_name }}
- release-notes: ${{ github.event.release.body }}
- compare-url-target-revision: ${{ github.event.release.target_commitish }}
-
- - name: Commit updated CHANGELOG
- uses: stefanzweifel/git-auto-commit-action@v4
- with:
- branch: ${{ github.event.release.target_commitish }}
- commit_message: Update CHANGELOG.md
- file_pattern: CHANGELOG.md
+ permissions:
+ contents: write
+ uses: laravel/.github/.github/workflows/update-changelog.yml@main
diff --git a/.gitignore b/.gitignore
index eb003b01a1d..f0d10af603e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,15 +1,18 @@
/node_modules
+/public/build
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
+.env.production
.phpunit.result.cache
-docker-compose.override.yml
Homestead.json
Homestead.yaml
+auth.json
npm-debug.log
yarn-error.log
+/.fleet
/.idea
/.vscode
diff --git a/.styleci.yml b/.styleci.yml
index 679a631e816..9daadf1610e 100644
--- a/.styleci.yml
+++ b/.styleci.yml
@@ -1,13 +1,9 @@
php:
preset: laravel
- version: 8
disabled:
- no_unused_imports
finder:
not-name:
- index.php
-js:
- finder:
- not-name:
- - webpack.mix.js
+js: true
css: true
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 74df6381060..6a34d3e90e9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,234 @@
# Release Notes
-## [Unreleased](https://github.com/laravel/laravel/compare/v9.0.1...9.x)
+## [Unreleased](https://github.com/laravel/laravel/compare/v9.5.2...9.x)
+
+## [v9.5.2](https://github.com/laravel/laravel/compare/v9.5.1...v9.5.2) - 2023-01-31
+
+### Changed
+
+- Adds "missing" validation rule translations by @timacdonald in https://github.com/laravel/laravel/pull/6078
+
+## [v9.5.1](https://github.com/laravel/laravel/compare/v9.5.0...v9.5.1) - 2023-01-11
+
+### Changed
+
+- Use minimum stability "stable" by @taylorotwell in https://github.com/laravel/laravel/commit/c1092ec084bb294a61b0f1c2149fddd662f1fc55
+
+## [v9.5.0](https://github.com/laravel/laravel/compare/v9.4.1...v9.5.0) - 2023-01-02
+
+### Changed
+
+- Update to Heroicons v2 by @driesvints in https://github.com/laravel/laravel/pull/6051
+- Support pusher-js v8.0 by @balu-lt in https://github.com/laravel/laravel/pull/6059
+- Switch password reset email to a primary key by @browner12 in https://github.com/laravel/laravel/pull/6064
+
+## [v9.4.1](https://github.com/laravel/laravel/compare/v9.4.0...v9.4.1) - 2022-12-19
+
+### Changed
+
+- Add decimal translation by @taylorotwell in https://github.com/laravel/laravel/commit/39f4830e92a7467b2a7fe6bc23d0ec14bc3b46a6
+
+## [v9.4.0](https://github.com/laravel/laravel/compare/v9.3.12...v9.4.0) - 2022-12-15
+
+### Added
+
+- Vite 4 support by @timacdonald in https://github.com/laravel/laravel/pull/6043
+
+### Changed
+
+- Add ulid and ascii validation message by @nshiro in https://github.com/laravel/laravel/pull/6046
+
+## [v9.3.12](https://github.com/laravel/laravel/compare/v9.3.11...v9.3.12) - 2022-11-22
+
+### Changed
+
+- Bump vite plugin version by @timacdonald in https://github.com/laravel/laravel/pull/6038
+
+## [v9.3.11](https://github.com/laravel/laravel/compare/v9.3.10...v9.3.11) - 2022-11-14
+
+### Changed
+
+- Adds lowercase validation rule translation by @timacdonald in https://github.com/laravel/laravel/pull/6028
+- Adds uppercase validation rule translation by @michaelnabil230 in https://github.com/laravel/laravel/pull/6029
+
+## [v9.3.10](https://github.com/laravel/laravel/compare/v9.3.9...v9.3.10) - 2022-10-28
+
+### Changed
+
+- Changing .env to make Pusher work without editing the commented out part in the bootstrap.js by @cveldman in https://github.com/laravel/laravel/pull/6021
+
+## [v9.3.9](https://github.com/laravel/laravel/compare/v9.3.8...v9.3.9) - 2022-10-17
+
+### Changed
+
+- Update welcome page colours by @timacdonald in https://github.com/laravel/laravel/pull/6002
+- Ignore .env.production by @yasapurnama in https://github.com/laravel/laravel/pull/6004
+- Upgrade axios to v1.x by @ankurk91 in https://github.com/laravel/laravel/pull/6008
+- Shorten pusher host config by @buihanh2304 in https://github.com/laravel/laravel/pull/6009
+
+## [v9.3.8](https://github.com/laravel/laravel/compare/v9.3.7...v9.3.8) - 2022-09-20
+
+### Changed
+
+- Validation added `required_if_accepted` by @luisprmat in https://github.com/laravel/laravel/pull/5987
+
+## [v9.3.7](https://github.com/laravel/laravel/compare/v9.3.6...v9.3.7) - 2022-09-02
+
+### Changed
+
+- Make email unique by @martin-ro in https://github.com/laravel/laravel/pull/5978
+
+## [v9.3.6](https://github.com/laravel/laravel/compare/v9.3.5...v9.3.6) - 2022-08-29
+
+### Changed
+
+- Bump Vite plugin version by @timacdonald in https://github.com/laravel/laravel/pull/5977
+
+## [v9.3.5](https://github.com/laravel/laravel/compare/v9.3.4...v9.3.5) - 2022-08-22
+
+### Changed
+
+- `max_digits` and `min_digits` validation translations by @danharrin in https://github.com/laravel/laravel/pull/5975
+- Use short closure by @taylorotwell in https://github.com/laravel/laravel/commit/7b17f5f32623c2ee75f2bff57a42bb8f180ac779
+- Use except by @taylorotwell in https://github.com/laravel/laravel/commit/e2e25f607a894427d6545f611ad3c8d94d022e9d
+
+## [v9.3.4](https://github.com/laravel/laravel/compare/v9.3.3...v9.3.4) - 2022-08-15
+
+### Changed
+
+- Add ValidateSignature middleware for ignore params by @valorin in https://github.com/laravel/laravel/pull/5942
+
+## [v9.3.3](https://github.com/laravel/laravel/compare/v9.3.2...v9.3.3) - 2022-08-03
+
+### Changed
+
+- Validation added `doesnt_end_with` translation by @kichetof in https://github.com/laravel/laravel/pull/5962
+
+## [v9.3.2](https://github.com/laravel/laravel/compare/v9.3.1...v9.3.2) - 2022-08-01
+
+### Changed
+
+- Update Sanctum by @suyar in https://github.com/laravel/laravel/pull/5957
+- Allow Pest plugin in Composer by @driesvints in https://github.com/laravel/laravel/pull/5959
+
+## [v9.3.1](https://github.com/laravel/laravel/compare/v9.3.0...v9.3.1) - 2022-07-26
+
+### Changed
+
+- Update font delivery by @abenerd in https://github.com/laravel/laravel/pull/5952
+- Don't need to ignore vite config file by @GrahamCampbell in https://github.com/laravel/laravel/pull/5953
+
+## [v9.3.0](https://github.com/laravel/laravel/compare/v9.2.1...v9.3.0) - 2022-07-20
+
+### Added
+
+- Uses `laravel/pint` for styling by @nunomaduro in https://github.com/laravel/laravel/pull/5945
+
+### Changed
+
+- Bump axios version by @ankurk91 in https://github.com/laravel/laravel/pull/5946
+- Vite 3 support by @timacdonald in https://github.com/laravel/laravel/pull/5944
+
+## [v9.2.1](https://github.com/laravel/laravel/compare/v9.2.0...v9.2.1) - 2022-07-13
+
+### Changed
+
+- Add auth.json to skeleton by @driesvints in https://github.com/laravel/laravel/pull/5924
+- Update `bootstrap.js` by @irsyadadl in https://github.com/laravel/laravel/pull/5929
+- Add default reloading to skeleton by @timacdonald in https://github.com/laravel/laravel/pull/5927
+- Update to the latest version of laravel-vite-plugin by @jessarcher in https://github.com/laravel/laravel/pull/5943
+
+## [v9.2.0](https://github.com/laravel/laravel/compare/v9.1.10...v9.2.0) - 2022-06-28
+
+### Added
+
+- Vite by @jessarcher in https://github.com/laravel/laravel/pull/5904
+- Added support for easy development configuration in bootstrap.js by @rennokki in https://github.com/laravel/laravel/pull/5900
+
+### Changed
+
+- Sorted entries in the `en` validation translations file by @FaridAghili in https://github.com/laravel/laravel/pull/5899
+
+## [v9.1.10](https://github.com/laravel/laravel/compare/v9.1.9...v9.1.10) - 2022-06-07
+
+### Changed
+
+- Add language line by @taylorotwell in https://github.com/laravel/laravel/commit/b084aacc5ad105e39c2b058e9523e73655be8d1f
+- Improve Pusher configuration for easy development by @oanhnn in https://github.com/laravel/laravel/pull/5897
+
+## [v9.1.9](https://github.com/laravel/laravel/compare/v9.1.8...v9.1.9) - 2022-05-28
+
+### Changed
+
+- Switch to ESM imports by @jessarcher in https://github.com/laravel/laravel/pull/5895
+
+## [v9.1.8](https://github.com/laravel/laravel/compare/v9.1.7...v9.1.8) - 2022-05-05
+
+### Changed
+
+- Add local_domain option to smtp configuration by @bintzandt in https://github.com/laravel/laravel/pull/5877
+- Add specific test user in seeder by @driesvints in https://github.com/laravel/laravel/pull/5879
+
+## [v9.1.7](https://github.com/laravel/laravel/compare/v9.1.6...v9.1.7) - 2022-05-03
+
+### Changed
+
+- Deprecation log stack trace option by @driesvints in https://github.com/laravel/laravel/pull/5874
+
+## [v9.1.6](https://github.com/laravel/laravel/compare/v9.1.5...v9.1.6) - 2022-04-20
+
+### Changed
+
+- Move password lines into main translation file by @taylorotwell in https://github.com/laravel/laravel/commit/db0d052ece1c17c506633f4c9f5604b65e1cc3a4
+- Add missing maintenance to config by @ibrunotome in https://github.com/laravel/laravel/pull/5868
+
+## [v9.1.5](https://github.com/laravel/laravel/compare/v9.1.4...v9.1.5) - 2022-04-12
+
+### Changed
+
+- Rearrange route methods by @osbre in https://github.com/laravel/laravel/pull/5862
+- Add levels to handler by @taylorotwell in https://github.com/laravel/laravel/commit/a507e1424339633ce423729ec0ac49b99f0e57d7
+
+## [v9.1.4](https://github.com/laravel/laravel/compare/v9.1.3...v9.1.4) - 2022-03-29
+
+### Changed
+
+- Add encryption configuration by @taylorotwell in https://github.com/laravel/laravel/commit/f7b982ebdf7bd31eda9f05f901bd92ed32446156
+
+## [v9.1.3](https://github.com/laravel/laravel/compare/v9.1.2...v9.1.3) - 2022-03-29
+
+### Changed
+
+- Add an example to the class aliases by @nshiro in https://github.com/laravel/laravel/pull/5846
+- Add username in config to use with phpredis + ACL by @neoteknic in https://github.com/laravel/laravel/pull/5851
+- Remove "password" from validation lang by @mnastalski in https://github.com/laravel/laravel/pull/5856
+- Make authenticate session a route middleware by @taylorotwell in https://github.com/laravel/laravel/pull/5842
+
+## [v9.1.2](https://github.com/laravel/laravel/compare/v9.1.1...v9.1.2) - 2022-03-15
+
+### Changed
+
+- The docker-compose.override.yml should not be ignored by default by @dakira in https://github.com/laravel/laravel/pull/5838
+
+## [v9.1.1](https://github.com/laravel/laravel/compare/v9.1.0...v9.1.1) - 2022-03-08
+
+### Changed
+
+- Add option to configure Mailgun transporter scheme by @jnoordsij in https://github.com/laravel/laravel/pull/5831
+- Add `throw` to filesystems config by @ankurk91 in https://github.com/laravel/laravel/pull/5835
+
+### Fixed
+
+- Small typo fix in filesystems.php by @tooshay in https://github.com/laravel/laravel/pull/5827
+- Update sendmail default params by @driesvints in https://github.com/laravel/laravel/pull/5836
+
+## [v9.1.0](https://github.com/laravel/laravel/compare/v9.0.1...v9.1.0) - 2022-02-22
+
+### Changed
+
+- Remove namespace from Routes by @emargareten in https://github.com/laravel/laravel/pull/5818
+- Update sanctum config file by @suyar in https://github.com/laravel/laravel/pull/5820
+- Replace Laravel CORS package by @driesvints in https://github.com/laravel/laravel/pull/5825
## [v9.0.1](https://github.com/laravel/laravel/compare/v9.0.0...v9.0.1) - 2022-02-15
diff --git a/README.md b/README.md
index f171ecacc26..3ed385a7dfe 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-
+
-
+
@@ -25,6 +25,8 @@ Laravel is accessible, powerful, and provides tools required for large, robust a
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
+You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
+
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
## Laravel Sponsors
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index 8e7fbd1be9c..82a37e40081 100644
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -7,17 +7,26 @@
class Handler extends ExceptionHandler
{
+ /**
+ * A list of exception types with their corresponding custom log levels.
+ *
+ * @var array, \Psr\Log\LogLevel::*>
+ */
+ protected $levels = [
+ //
+ ];
+
/**
* A list of the exception types that are not reported.
*
- * @var array>
+ * @var array>
*/
protected $dontReport = [
//
];
/**
- * A list of the inputs that are never flashed for validation exceptions.
+ * A list of the inputs that are never flashed to the session on validation exceptions.
*
* @var array
*/
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index d3722c2d5c4..0079688113e 100644
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -16,7 +16,7 @@ class Kernel extends HttpKernel
protected $middleware = [
// \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class,
- \Fruitcake\Cors\HandleCors::class,
+ \Illuminate\Http\Middleware\HandleCors::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
@@ -33,7 +33,6 @@ class Kernel extends HttpKernel
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
- // \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
@@ -56,11 +55,12 @@ class Kernel extends HttpKernel
protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
+ 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
- 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
+ 'signed' => \App\Http\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];
diff --git a/app/Http/Middleware/ValidateSignature.php b/app/Http/Middleware/ValidateSignature.php
new file mode 100644
index 00000000000..093bf64af81
--- /dev/null
+++ b/app/Http/Middleware/ValidateSignature.php
@@ -0,0 +1,22 @@
+
+ */
+ protected $except = [
+ // 'fbclid',
+ // 'utm_campaign',
+ // 'utm_content',
+ // 'utm_medium',
+ // 'utm_source',
+ // 'utm_term',
+ ];
+}
diff --git a/app/Models/User.php b/app/Models/User.php
index 89963686eb2..23b406346fd 100644
--- a/app/Models/User.php
+++ b/app/Models/User.php
@@ -2,7 +2,7 @@
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;
diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php
index 22b77e6e3b9..33b83f5696a 100644
--- a/app/Providers/AuthServiceProvider.php
+++ b/app/Providers/AuthServiceProvider.php
@@ -2,13 +2,13 @@
namespace App\Providers;
+// use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
-use Illuminate\Support\Facades\Gate;
class AuthServiceProvider extends ServiceProvider
{
/**
- * The policy mappings for the application.
+ * The model to policy mappings for the application.
*
* @var array
*/
diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php
index 45ca6685f41..ab8b2cf77bb 100644
--- a/app/Providers/EventServiceProvider.php
+++ b/app/Providers/EventServiceProvider.php
@@ -10,7 +10,7 @@
class EventServiceProvider extends ServiceProvider
{
/**
- * The event listener mappings for the application.
+ * The event to listener mappings for the application.
*
* @var array>
*/
diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php
index 0ba5291ff5b..ea87f2e57d0 100644
--- a/app/Providers/RouteServiceProvider.php
+++ b/app/Providers/RouteServiceProvider.php
@@ -13,14 +13,14 @@ class RouteServiceProvider extends ServiceProvider
/**
* The path to the "home" route for your application.
*
- * This is used by Laravel authentication to redirect users after login.
+ * Typically, users are redirected here after authentication.
*
* @var string
*/
public const HOME = '/home';
/**
- * Define your route model bindings, pattern filters, etc.
+ * Define your route model bindings, pattern filters, and other route configuration.
*
* @return void
*/
@@ -29,8 +29,8 @@ public function boot()
$this->configureRateLimiting();
$this->routes(function () {
- Route::prefix('api')
- ->middleware('api')
+ Route::middleware('api')
+ ->prefix('api')
->group(base_path('routes/api.php'));
Route::middleware('web')
diff --git a/composer.json b/composer.json
index 5f338913025..024809f163d 100644
--- a/composer.json
+++ b/composer.json
@@ -6,14 +6,14 @@
"license": "MIT",
"require": {
"php": "^8.0.2",
- "fruitcake/laravel-cors": "^2.0.5",
"guzzlehttp/guzzle": "^7.2",
- "laravel/framework": "^9.0",
- "laravel/sanctum": "^2.14.1",
+ "laravel/framework": "^9.19",
+ "laravel/sanctum": "^3.0",
"laravel/tinker": "^2.7"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
+ "laravel/pint": "^1.0",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
@@ -55,8 +55,11 @@
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
- "sort-packages": true
+ "sort-packages": true,
+ "allow-plugins": {
+ "pestphp/pest-plugin": true
+ }
},
- "minimum-stability": "dev",
+ "minimum-stability": "stable",
"prefer-stable": true
}
diff --git a/config/app.php b/config/app.php
index 7c60cd9defe..ef76a7ed6ae 100644
--- a/config/app.php
+++ b/config/app.php
@@ -125,6 +125,24 @@
'cipher' => 'AES-256-CBC',
+ /*
+ |--------------------------------------------------------------------------
+ | Maintenance Mode Driver
+ |--------------------------------------------------------------------------
+ |
+ | These configuration options determine the driver used to determine and
+ | manage Laravel's "maintenance mode" status. The "cache" driver will
+ | allow maintenance mode to be controlled across multiple machines.
+ |
+ | Supported drivers: "file", "cache"
+ |
+ */
+
+ 'maintenance' => [
+ 'driver' => 'file',
+ // 'store' => 'redis',
+ ],
+
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
@@ -191,7 +209,7 @@
*/
'aliases' => Facade::defaultAliases()->merge([
- // ...
+ // 'ExampleClass' => App\Example\ExampleClass::class,
])->toArray(),
];
diff --git a/config/auth.php b/config/auth.php
index d8c6cee7c19..d83996ade27 100644
--- a/config/auth.php
+++ b/config/auth.php
@@ -84,6 +84,10 @@
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
+ | The throttle setting is the number of seconds a user must wait before
+ | generating more password reset tokens. This prevents the user from
+ | quickly generating a very large amount of password reset tokens.
+ |
*/
'passwords' => [
diff --git a/config/broadcasting.php b/config/broadcasting.php
index 67fcbbd6c89..9e4d4aa44b5 100644
--- a/config/broadcasting.php
+++ b/config/broadcasting.php
@@ -36,8 +36,11 @@
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
- 'cluster' => env('PUSHER_APP_CLUSTER'),
- 'useTLS' => true,
+ 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
+ 'port' => env('PUSHER_PORT', 443),
+ 'scheme' => env('PUSHER_SCHEME', 'https'),
+ 'encrypted' => true,
+ 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
diff --git a/config/cache.php b/config/cache.php
index 0ad5c74064d..33bb29546eb 100644
--- a/config/cache.php
+++ b/config/cache.php
@@ -99,9 +99,9 @@
| Cache Key Prefix
|--------------------------------------------------------------------------
|
- | When utilizing a RAM based store such as APC or Memcached, there might
- | be other applications utilizing the same cache. So, we'll specify a
- | value to get prefixed to all our keys so we can avoid collisions.
+ | When utilizing the APC, database, memcached, Redis, or DynamoDB cache
+ | stores there might be other applications using the same cache. For
+ | that reason, you may prefix every cache key to avoid collisions.
|
*/
diff --git a/config/database.php b/config/database.php
index 0faebaee82e..137ad18ce38 100644
--- a/config/database.php
+++ b/config/database.php
@@ -89,6 +89,8 @@
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
+ // 'encrypt' => env('DB_ENCRYPT', 'yes'),
+ // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
],
],
@@ -129,6 +131,7 @@
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
+ 'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
@@ -137,6 +140,7 @@
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
+ 'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
diff --git a/config/filesystems.php b/config/filesystems.php
index cf5abce7664..e9d9dbdbe8a 100644
--- a/config/filesystems.php
+++ b/config/filesystems.php
@@ -22,7 +22,7 @@
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
- | been setup for each driver as an example of the required options.
+ | been set up for each driver as an example of the required values.
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
@@ -33,6 +33,7 @@
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
+ 'throw' => false,
],
'public' => [
@@ -40,6 +41,7 @@
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
+ 'throw' => false,
],
's3' => [
@@ -51,6 +53,7 @@
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
+ 'throw' => false,
],
],
diff --git a/config/logging.php b/config/logging.php
index fefe0885c6a..5aa1dbb7881 100644
--- a/config/logging.php
+++ b/config/logging.php
@@ -30,7 +30,10 @@
|
*/
- 'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
+ 'deprecations' => [
+ 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
+ 'trace' => false,
+ ],
/*
|--------------------------------------------------------------------------
diff --git a/config/mail.php b/config/mail.php
index 87b6fe3c882..534395a369b 100644
--- a/config/mail.php
+++ b/config/mail.php
@@ -42,6 +42,7 @@
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
+ 'local_domain' => env('MAIL_EHLO_DOMAIN'),
],
'ses' => [
@@ -58,7 +59,7 @@
'sendmail' => [
'transport' => 'sendmail',
- 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'),
+ 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
],
'log' => [
diff --git a/config/services.php b/config/services.php
index 2a1d616c774..0ace530e8d2 100644
--- a/config/services.php
+++ b/config/services.php
@@ -18,6 +18,7 @@
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
+ 'scheme' => 'https',
],
'postmark' => [
diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php
index 23b61d24286..41f8ae896be 100644
--- a/database/factories/UserFactory.php
+++ b/database/factories/UserFactory.php
@@ -18,8 +18,8 @@ class UserFactory extends Factory
public function definition()
{
return [
- 'name' => $this->faker->name(),
- 'email' => $this->faker->unique()->safeEmail(),
+ 'name' => fake()->name(),
+ 'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'remember_token' => Str::random(10),
@@ -33,10 +33,8 @@ public function definition()
*/
public function unverified()
{
- return $this->state(function (array $attributes) {
- return [
- 'email_verified_at' => null,
- ];
- });
+ return $this->state(fn (array $attributes) => [
+ 'email_verified_at' => null,
+ ]);
}
}
diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php
index fcacb80b3e1..e5f1397c960 100644
--- a/database/migrations/2014_10_12_100000_create_password_resets_table.php
+++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php
@@ -14,7 +14,7 @@
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
- $table->string('email')->index();
+ $table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
index fd235f8c5d0..6c81fd229d9 100644
--- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
+++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
@@ -20,6 +20,7 @@ public function up()
$table->string('token', 64)->unique();
$table->text('abilities')->nullable();
$table->timestamp('last_used_at')->nullable();
+ $table->timestamp('expires_at')->nullable();
$table->timestamps();
});
}
diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php
index 71f673f023f..76d96dc7f5b 100644
--- a/database/seeders/DatabaseSeeder.php
+++ b/database/seeders/DatabaseSeeder.php
@@ -2,7 +2,7 @@
namespace Database\Seeders;
-use Illuminate\Database\Console\Seeds\WithoutModelEvents;
+// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
@@ -15,5 +15,10 @@ class DatabaseSeeder extends Seeder
public function run()
{
// \App\Models\User::factory(10)->create();
+
+ // \App\Models\User::factory()->create([
+ // 'name' => 'Test User',
+ // 'email' => 'test@example.com',
+ // ]);
}
}
diff --git a/lang/en.json b/lang/en.json
deleted file mode 100644
index 577680dd720..00000000000
--- a/lang/en.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "The :attribute must contain at least one letter.": "The :attribute must contain at least one letter.",
- "The :attribute must contain at least one number.": "The :attribute must contain at least one number.",
- "The :attribute must contain at least one symbol.": "The :attribute must contain at least one symbol.",
- "The :attribute must contain at least one uppercase and one lowercase letter.": "The :attribute must contain at least one uppercase and one lowercase letter.",
- "The given :attribute has appeared in a data leak. Please choose a different :attribute.": "The given :attribute has appeared in a data leak. Please choose a different :attribute."
-}
diff --git a/lang/en/validation.php b/lang/en/validation.php
index 4707f1a6bc2..70407c9d974 100644
--- a/lang/en/validation.php
+++ b/lang/en/validation.php
@@ -22,6 +22,7 @@
'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'The :attribute must only contain letters and numbers.',
'array' => 'The :attribute must be an array.',
+ 'ascii' => 'The :attribute must only contain single-byte alphanumeric characters and symbols.',
'before' => 'The :attribute must be a date before :date.',
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
'between' => [
@@ -36,6 +37,7 @@
'date' => 'The :attribute is not a valid date.',
'date_equals' => 'The :attribute must be a date equal to :date.',
'date_format' => 'The :attribute does not match the format :format.',
+ 'decimal' => 'The :attribute must have :decimal decimal places.',
'declined' => 'The :attribute must be declined.',
'declined_if' => 'The :attribute must be declined when :other is :value.',
'different' => 'The :attribute and :other must be different.',
@@ -43,6 +45,8 @@
'digits_between' => 'The :attribute must be between :min and :max digits.',
'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
+ 'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.',
+ 'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.',
'email' => 'The :attribute must be a valid email address.',
'ends_with' => 'The :attribute must end with one of the following: :values.',
'enum' => 'The selected :attribute is invalid.',
@@ -69,6 +73,7 @@
'ipv4' => 'The :attribute must be a valid IPv4 address.',
'ipv6' => 'The :attribute must be a valid IPv6 address.',
'json' => 'The :attribute must be a valid JSON string.',
+ 'lowercase' => 'The :attribute must be lowercase.',
'lt' => [
'array' => 'The :attribute must have less than :value items.',
'file' => 'The :attribute must be less than :value kilobytes.',
@@ -88,6 +93,7 @@
'numeric' => 'The :attribute must not be greater than :max.',
'string' => 'The :attribute must not be greater than :max characters.',
],
+ 'max_digits' => 'The :attribute must not have more than :max digits.',
'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.',
'min' => [
@@ -96,11 +102,23 @@
'numeric' => 'The :attribute must be at least :min.',
'string' => 'The :attribute must be at least :min characters.',
],
+ 'min_digits' => 'The :attribute must have at least :min digits.',
+ 'missing' => 'The :attribute field must be missing.',
+ 'missing_if' => 'The :attribute field must be missing when :other is :value.',
+ 'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
+ 'missing_with' => 'The :attribute field must be missing when :values is present.',
+ 'missing_with_all' => 'The :attribute field must be missing when :values are present.',
'multiple_of' => 'The :attribute must be a multiple of :value.',
'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute format is invalid.',
'numeric' => 'The :attribute must be a number.',
- 'password' => 'The password is incorrect.',
+ 'password' => [
+ 'letters' => 'The :attribute must contain at least one letter.',
+ 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.',
+ 'numbers' => 'The :attribute must contain at least one number.',
+ 'symbols' => 'The :attribute must contain at least one symbol.',
+ 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
+ ],
'present' => 'The :attribute field must be present.',
'prohibited' => 'The :attribute field is prohibited.',
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
@@ -110,6 +128,7 @@
'required' => 'The :attribute field is required.',
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
'required_if' => 'The :attribute field is required when :other is :value.',
+ 'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values are present.',
@@ -127,7 +146,9 @@
'timezone' => 'The :attribute must be a valid timezone.',
'unique' => 'The :attribute has already been taken.',
'uploaded' => 'The :attribute failed to upload.',
+ 'uppercase' => 'The :attribute must be uppercase.',
'url' => 'The :attribute must be a valid URL.',
+ 'ulid' => 'The :attribute must be a valid ULID.',
'uuid' => 'The :attribute must be a valid UUID.',
/*
diff --git a/package.json b/package.json
index 7a9aecdf303..0b32ba6957a 100644
--- a/package.json
+++ b/package.json
@@ -1,18 +1,14 @@
{
"private": true,
"scripts": {
- "dev": "npm run development",
- "development": "mix",
- "watch": "mix watch",
- "watch-poll": "mix watch -- --watch-options-poll=1000",
- "hot": "mix watch --hot",
- "prod": "npm run production",
- "production": "mix --production"
+ "dev": "vite",
+ "build": "vite build"
},
"devDependencies": {
- "axios": "^0.25",
- "laravel-mix": "^6.0.6",
+ "axios": "^1.1.2",
+ "laravel-vite-plugin": "^0.7.2",
"lodash": "^4.17.19",
- "postcss": "^8.1.14"
+ "postcss": "^8.1.14",
+ "vite": "^4.0.0"
}
}
diff --git a/resources/js/app.js b/resources/js/app.js
index 40c55f65c25..e59d6a0adf7 100644
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@ -1 +1 @@
-require('./bootstrap');
+import './bootstrap';
diff --git a/resources/js/bootstrap.js b/resources/js/bootstrap.js
index 6922577695e..a5b3eddc560 100644
--- a/resources/js/bootstrap.js
+++ b/resources/js/bootstrap.js
@@ -1,4 +1,5 @@
-window._ = require('lodash');
+import _ from 'lodash';
+window._ = _;
/**
* We'll load the axios HTTP library which allows us to easily issue requests
@@ -6,7 +7,8 @@ window._ = require('lodash');
* CSRF token as a header based on the value of the "XSRF" token cookie.
*/
-window.axios = require('axios');
+import axios from 'axios';
+window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
@@ -18,11 +20,16 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
// import Echo from 'laravel-echo';
-// window.Pusher = require('pusher-js');
+// import Pusher from 'pusher-js';
+// window.Pusher = Pusher;
// window.Echo = new Echo({
// broadcaster: 'pusher',
-// key: process.env.MIX_PUSHER_APP_KEY,
-// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
-// forceTLS: true
+// key: import.meta.env.VITE_PUSHER_APP_KEY,
+// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1',
+// wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`,
+// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
+// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
+// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
+// enabledTransports: ['ws', 'wss'],
// });
diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php
index dd6a45db766..9faad4e85ad 100644
--- a/resources/views/welcome.blade.php
+++ b/resources/views/welcome.blade.php
@@ -7,11 +7,11 @@
Laravel
-
+