scaffoldにてページ作成後にDB側も設定してソースは出来ているのですが、該当のURL(210.../videos)が404NotFoundになります。
原因等がわかりませんでしょうか?
[root@stream-sub stream]# php artisan make:scaffold Video --schema="title:string,comment:text,keyword:string" Configuring Video... Migration created successfully Seed created successfully. Model created successfully. Controller created successfully. Layout created successfully. Error created successfully. Views created successfully. Dump-autoload... Route::resource("videos","VideoController"); // Add this line in routes.php
routes/web.php
<?php /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | This file is where you may define all of the routes that are handled | by your application. Just tell Laravel the URIs it should respond | to using a Closure or controller method. Build something great! | */ Route::get('/', function () { return view('welcome'); }); Route::resource("videos","VideoController");
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。