0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Laravel 11でメインのblade.phpファイル名を変更する

Posted at

ルート設定の変更

ファイル: routes/web.php
デフォルトではwelcome.blade.phpが表示されるように設定されているので、任意のファイル名に変更します。今回はapp.blade.phpとします。
具体的にはreturn view('welcome');return view('app');に変更します。

web.php

use Illuminate\Support\Facades\Route;

Route::get('/', function () {
    return view('app');
});

welcome.blade.phpを削除または名称変更

welcome.blade.phpを削除または名称変更してapp.blade.phpを作成します。ファイル内の記述については本章では省略します。

キャッシュのクリア

bash

php artisan config:clear
php artisan view:clear
php artisan cache:clear

サーバーの再起度

必要に応じてLaravelとViteの開発サーバーを再起動します。

Laravelサーバー再起動

bash

php artisan serve

Viteサーバー再起動

bash

npm run dev
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?