Controller.php中的NotFoundHttpException第269行:未找到控制器方法。如何解決此錯誤:在laravel中找不到控制器方法?
提交表單前原:
http://localhost/framework_freshway/public_html/home/setting
:http://localhost/framework_freshway/public_html/home/setting
soulfy/setting.blade.php
<li>
<form action="../home/setting" method="post">
<span class="setting-name">MENU CSS</span>
<!-- <form method="POST" action="/posts"> -->
{{ csrf_field() }}
<span class="setting-value center">
<select name="cars">
<option value="red">Red</option>
<option value="blue">Green</option>
<option value="green">Orange</option>
<option value="orange">Yellow</option>
<option value="orange">Blue</option>
<option value="orange">Black</option>
<option value="orange">White</option>
<option value="orange">Grey</option>
</select>
<!-- <div style="width: 150px; height: 30px;"> <input type="image" src="http://localhost/framework_freshway/public_html/images/submit.png" value="SUBMIT" width="10"> -->
<input type="submit" value="Submit">
</span>
<br><br><br>
</form>
</li>
按下提交按鈕它去這個網址後Controller.php中的NotFoundHttpException第269行:未找到控制器方法。
Route::post('/', [
'uses' => '[email protected]'
]);
Route::controllers([
'auth' => 'Auth\AuthController',
'password' => 'Auth\PasswordController',
'home'=>'HomeController',
'member'=>'MemberController',
'mail'=>'MailController',
'social'=>'SocialController',
'ajax'=>'AjaxController',
'api'=>'ApiController',
'timeline'=>'TimelineController',
'setting'=>'SettingController',
'ecommerce'=>'EcommerceController',
'test'=>'TestController',
]);
route not defined路線:: post('/ home/setting','SettingController @ getMenu'); – JYoThI