I have a project in which I am using Angular 4 and Laravel 5.
Locally it is running locally but when I go into production (I'm using Azure as the server) it does not work properly.
I have a registration form and Angular. And clicking the "register" button will execute this method:
onSubmit(form){
console.log(form.value);
this.http.post('/api/register', (form.value))
.map(dados => dados)
.subscribe(dados => console.log(dados));
}
This method sends the data to the Laravel api route (api.php):
Route::post('/register', 'UserController@store');
Locally, when I run the application via "php artisan serves" command, it works perfectly. But when I went into production, the console reported this error when I clicked the "register" button:
"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
It is trying to access the URL / api / register but this url does not really exist.
Locally it recognizes, but in production does not work. How can I resolve or circumvent this error?