11/15 オトナのLaravel&Vue.js開発入門@未来会議室【フロント編】

1. ホーム画面のrouting設定

routes/web.phpに追記
<?php
// 編集前
/*
|--------------------------------------------------------------------------
| 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');
});


<?php
# 編集後
Route::get('/', 'AttendancesController@index')->name('home');

Controllerを作成
$ php artisan make:controller AttendancesController

app/Http/Controllers/AttendancesController.phpが生成される
<?php
// 編集前
namespace App\Http\Controllers;

use Illuminate\Http\Request;

class AttendancesController extends Controller
{
    //
}

viewファイルを返すように設定
<?php
// 編集後
namespace App\Http\Controllers;

use Illuminate\Http\Request;

class AttendancesController extends Controller
{
    public function index()