Laravel routes are not found in 000webhost
I’m building a simple blog for my personal projects with Laravel 5.4.36. I have uploaded it to 000webhost
. The problem is everytime I`m trying to sign up or sign in, it is saying,
The requested URL was not found on this server
Here is the URL that is shown during this error,
https://myprojectblog.000webhostapp.com/signUp
Here ‘signUp’ or ‘signIn’ are provided in the routes file which are given below,
Route::post('/signUp', [
'uses'=>'UserController@postSignUp',
'as'=>'signUp'
]);
Route::post('/signIn', [
'uses'=>'UserController@postSignIn',
'as'=>'signIn'
]);
The sign up form is given below,
<div class="signUp">
<label>Sign Up</label></br>
<form action="" method="POST" name="signUp" id="signUp">
<label id="usernameLabelSignUp">Username</label></br>
<input type="text" id="usernameSignUp" name="username" value=""></br>
<label id="emailLabelSignUp">Email</label></br>
<input type="text" id="emailSignUp" name="email" value=""></br>
<label id="passwordLabelSignUp">Password</label></br>
<input type="password" id="passwordSignUp" name="password"></br>
<input type="hidden" name="_token" value="">
<input type="submit" id="signUpSubmit" value="signUp">
</form></br>
</div>
In the cpanel of 000webhost my file structure is,
/
-Blog
-All the Laravel project directories and files except public
-public_html
-public
-css
-js
-.htacess
-index.php
-favicon.ico
-robots.txt
-web.config
My index.php in /public_html/public got included these lines,
require __DIR__.'/../Blog/bootstrap/autoload.php';
$app = require_once __DIR__.'/../Blog/bootstrap/app.php';
The index page loads without any trouble, but while trying to sign in or up the error occurs.
Most importantly everything runs absolutely fine in my local machine, no trouble at all.
Some clue would mean great help. Thank you.
from Laravel Questions and Answers https://laravelquestions.com/php/laravel-routes-are-not-found-in-000webhost/
via Lzo Media
No comments:
Post a Comment