Please excuse my bad english level. I'am studying laravel 5 and I have an error with a redirection.
I have a controller with two function:
class MainController extends Controller
{
public function index() {
//Some code
return view('index.main',compact('someDatas');
}
public function update(Request $request) {
//Some code here
return redirect(route('main'));
}
}
my route.php
Route::get('/', "main\MainController@index") -> name('main');
Route::get('/update', "main\MainController@update") -> name('update');
In my main.blade.php I have a link with redirection to update:
<a href=""></a>
When i click on the link I have an error :
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
The URL is https://127.0.0.1:8000/update but when i remove the 's' of HTTPS I'm redirect to main menu.
I don't understand why this error happens, I have other program with similar code and it works.
Thanks for your time and your responses!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire