<?php namespace App\Http\Controllers; use Illuminate\Http\Request; class HelloController extends Controller { public function index(Request $request){ return view('hello.index', ['msg' => "GETが送信されました"]); } public function post(Request $request){ return view('hello.index',['msg' => "POSTが送信されました"]); } } 上記の例では、helloというアクションがGETで呼び出された場合はHelloController内に記述されたindexメソッドを呼びます。 同様に、POSTで呼び出された場合はpostメ
