I would like to post with Ravel and transition the screen, but I cannot.
The error details are as follows.
The requested URL/hellow was not found on this server.
I think there are other settings besides the code, but I don't know the cause even if I look into it.
I look forward to your kind cooperation.
index.blade.php
<html>
<head>
<title>Hello/Index</title>
<style>
body {font-size:16pt;color:#999;}
h1 { font-size: 50pt; text-align:right; color:#f6f6f6;
margin —20px0px-30px0px; letter-spacing:-4pt;}
</style>
</head>
<body>
<h1>Blade/Index</h1>
<p>{{$msg}}</p>
<form method="POST" action="/hello">
{{csrf_field()}}
<input type="text" name="msg">
<input type="submit">
</form>
</body>
</html>
HelloController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class HelloController extensions Controller
{
// Action Description
public function index() {
$data=['msg'=>'Please enter a name.',
];
return view('hello.index',$data);
}
public function post(Request$request){
$msg = $request->msg;
$data=['msg'=>'Hello'.$msg.', ];
return view('hello.index',$data);
}
}
web.php
<?php
Route::get('/', function(){
return view('welcome');
});
Route::get('hello', 'HelloController@index');
Route::post('hello', 'HelloController@post');
Route::get('hello', 'HelloController@index');
Route::post('hello', 'HelloController@post');
Would it be possible to correct as follows?
Route::get('/hello', 'HelloController@index');
Route::post('/hello', 'HelloController@post');
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
578 Understanding How to Configure Google API Key
582 PHP ssh2_scp_send fails to send files as intended
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
619 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.