Skip to content

Commit f25a4cc

Browse files
Merge pull request #174 from laravel/main
Update preview
2 parents 07e68ed + 1936a8d commit f25a4cc

File tree

109 files changed

+4847
-2613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+4847
-2613
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88

99
CHANGELOG.md export-ignore
1010
README.md export-ignore
11+
.github/workflows/browser-tests.yml export-ignore
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: browser-tests
2+
3+
on:
4+
push:
5+
branches:
6+
- pest-ci
7+
- develop
8+
- main
9+
pull_request:
10+
branches:
11+
- pest-ci
12+
- develop
13+
- main
14+
15+
jobs:
16+
ci:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup PHP
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: 8.4
27+
tools: composer:v2
28+
coverage: xdebug
29+
30+
- name: Setup Node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: '22'
34+
cache: 'npm'
35+
36+
- name: Install Node Dependencies
37+
run: npm ci
38+
39+
- name: Install Playwright Dependencies
40+
run: npm install playwright@latest
41+
42+
- name: Install Playwright Browsers
43+
run: npx playwright install --with-deps
44+
45+
- name: Add `laravel-labs/starter-kit-browser-tests` Repository
46+
run: |
47+
composer config repositories.browser-tests '{"type": "vcs", "url": "https://github.com/laravel-labs/starter-kit-browser-tests"}' --file composer.json
48+
composer remove "phpunit/phpunit" --dev --no-update
49+
composer require "laravel-labs/starter-kit-browser-tests:dev-main@dev" --dev --no-update
50+
51+
- name: Install Dependencies
52+
run: composer install --no-interaction --prefer-dist --optimize-autoloader
53+
54+
- name: Copy Environment File
55+
run: cp .env.example .env
56+
57+
- name: Generate Application Key
58+
run: php artisan key:generate
59+
60+
- name: Setup Test Environment
61+
run: |
62+
cp vendor/laravel-labs/starter-kit-browser-tests/phpunit.xml.dist .
63+
rm phpunit.xml
64+
rm -Rf tests/
65+
cp -rf vendor/laravel-labs/starter-kit-browser-tests/tests/ tests/
66+
67+
- name: Build Assets
68+
run: npm run build
69+
70+
- name: Tests
71+
run: php vendor/bin/pest

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
- name: Install Node Dependencies
3535
run: npm ci
3636

37-
- name: Build Assets
38-
run: npm run build
39-
4037
- name: Install Dependencies
4138
run: composer install --no-interaction --prefer-dist --optimize-autoloader
4239

40+
- name: Build Assets
41+
run: npm run build
42+
4343
- name: Copy Environment File
4444
run: cp .env.example .env
4545

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
/public/build
55
/public/hot
66
/public/storage
7+
/resources/js/actions
8+
/resources/js/routes
9+
/resources/js/wayfinder
710
/storage/*.key
811
/storage/pail
912
/vendor
13+
.DS_Store
1014
.env
1115
.env.backup
1216
.env.production

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
resources/js/components/ui/*
2+
resources/views/mail/*

.prettierrc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@
33
"singleQuote": true,
44
"singleAttributePerLine": false,
55
"htmlWhitespaceSensitivity": "css",
6-
"printWidth": 150,
7-
"plugins": ["prettier-plugin-organize-imports", "prettier-plugin-tailwindcss"],
8-
"tailwindFunctions": ["clsx", "cn"],
6+
"printWidth": 80,
7+
"plugins": [
8+
"prettier-plugin-organize-imports",
9+
"prettier-plugin-tailwindcss"
10+
],
11+
"tailwindFunctions": [
12+
"clsx",
13+
"cn"
14+
],
15+
"tailwindStylesheet": "resources/css/app.css",
916
"tabWidth": 4,
1017
"overrides": [
1118
{

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Our React starter kit provides a robust, modern starting point for building Lara
66

77
Inertia allows you to build modern, single-page React applications using classic server-side routing and controllers. This lets you enjoy the frontend power of React combined with the incredible backend productivity of Laravel and lightning-fast Vite compilation.
88

9-
This React starter kit utilizes React 19, TypeScript, Tailwind, and the [shadcn/ui](https://ui.shadcn.com) component library.
9+
This React starter kit utilizes React 19, TypeScript, Tailwind, and the [shadcn/ui](https://ui.shadcn.com) and [radix-ui](https://www.radix-ui.com) component libraries.
1010

1111
## Official Documentation
1212

app/Http/Controllers/Auth/AuthenticatedSessionController.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Illuminate\Support\Facades\Route;
1111
use Inertia\Inertia;
1212
use Inertia\Response;
13+
use Laravel\Fortify\Features;
1314

1415
class AuthenticatedSessionController extends Controller
1516
{
@@ -29,7 +30,18 @@ public function create(Request $request): Response
2930
*/
3031
public function store(LoginRequest $request): RedirectResponse
3132
{
32-
$request->authenticate();
33+
$user = $request->validateCredentials();
34+
35+
if (Features::enabled(Features::twoFactorAuthentication()) && $user->hasEnabledTwoFactorAuthentication()) {
36+
$request->session()->put([
37+
'login.id' => $user->getKey(),
38+
'login.remember' => $request->boolean('remember'),
39+
]);
40+
41+
return to_route('two-factor.login');
42+
}
43+
44+
Auth::login($user, $request->boolean('remember'));
3345

3446
$request->session()->regenerate();
3547

app/Http/Controllers/Auth/ConfirmablePasswordController.php

Lines changed: 0 additions & 41 deletions
This file was deleted.

app/Http/Controllers/Auth/NewPasswordController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace App\Http\Controllers\Auth;
44

55
use App\Http\Controllers\Controller;
6+
use App\Models\User;
67
use Illuminate\Auth\Events\PasswordReset;
78
use Illuminate\Http\RedirectResponse;
89
use Illuminate\Http\Request;
@@ -45,7 +46,7 @@ public function store(Request $request): RedirectResponse
4546
// database. Otherwise we will parse the error and return the response.
4647
$status = Password::reset(
4748
$request->only('email', 'password', 'password_confirmation', 'token'),
48-
function ($user) use ($request) {
49+
function (User $user) use ($request) {
4950
$user->forceFill([
5051
'password' => Hash::make($request->password),
5152
'remember_token' => Str::random(60),

0 commit comments

Comments
 (0)