- 1. 概要
- 2. 調査
1. 概要
下記を参考に、学習していきます。
「ビュー 7.x Laravel」
この時点で、「PHP - Laravel - Apache」「PHP - Laravel - Hello World!」を適用して、
「Laravel」のドキュメントとして、下記へアクセスできるようになっています。
http://ドメイン/laravel/
http://ドメイン/laravel/hello/
http://ドメイン/laravel/hello/hello/
2. 調査
routes/web.php
のデフォルトは
<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('welcome');
});
となっておりました。
これは、参考サイトによれば
resources/views/welcome.blade.php
が、存在しておるはず。
見てみると
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
から始まって、
</div>
</div>
</div>
</body>
</html>
で終わっておる(128行目は、こちらの都合、実際はきちんとネストされております)。
うむうむ、こいつが、ドキュメントルートを表示しておるのじゃな。
|