私のWebアプリケーションで問題が発生したのは、ユーザーがステータスを入力し、ステータスを保存する代わりに「ステータスを追加」を押すと、次のエラーが表示されます。 NotFoundHttpException in RouteCollection.php (line 179)
。 私はオンラインでいくつかの研究を行い、同様の問題を見て回ってみましたが、同じ問題が残っています。RouteCollection.php(行179)のNotFoundHttpException
この私のコントローラクラス
<?php
namespace App\Http\Controllers;
use Request;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index(Request $r)
{
if(Request::has('status-text'))
{
$text = e(Request::get('status-text'));
$userStatus = new Status();
$userStatus->status_text = $text;
$userStatus->user_id = Auth::user()->id;
$userStatus->save();
Flash::success('Your status has been posted');
return redirect(route('home'));
}
return view('home');
}
}
である。これは私のweb.phpクラスです
<?php
return view('welcome');
});
Auth::routes();
Route::any('/home', ['as'=> 'home','uses'=>'HomeController[email protected]']);
は、これは私が戻って取得していますエラーの画像です:
あなたは存在しないページにアクセスしています。それは404 – devk
私は知っている、それはちょうど最初に状態を保存し、その後、ホームページに戻ることになっていることを知っている – Russkiy
ステータスを保存した後(404を得る)ブラウザのURLは何と言うのでしょうか? – devk