====== 21 Laravel Controller作成からViewまで ====== ===== Controller作成 ===== $ php artisan make:controller HelloWorld $ ll app/Http/Controllers/HelloWorld.php -rw-r--r-- 1 matsui users 117 Mar 19 16:36 app/Http/Controllers/HelloWorld.php ===== Route追加 ===== Route::get('/hello','HelloWorld@hello'); ===== View追加 ===== contact

{{$hello}}

@foreach ($hello_array as $h) {{$h}} @endforeach ===== Webからアクセス ===== http://example.com/hello {{:11_php:02_framework:hello.png|}} {{tag>Laravel}}