テンプレートファイルを resources/views フォルダに作成する。
ファイルの拡張子は "blade.php"
例:resources/views/hello.blade.php
routes/web.php から呼び出す際は view('テンプレート名') で良い。
ファイルの拡張子は "blade.php"
例:resources/views/hello.blade.php
1 2 3 4 5 6 7 8 9 10 11 12 | <!DOCTYPE html> <html lang= "jp" > < head > <meta charset= "UTF-8" > <meta http-equiv= "X-UA-Compatible" content= "IE=edge" > <meta name= "viewport" content= "width=device-width, initial-scale=1.0" > <title>Document< /title > < /head > <body> <h1>hello< /h1 > < /body > < /html > |
1 2 3 | Route::get( '/hello' , function () { return view( 'hello' ); }); |
0 件のコメント:
コメントを投稿