Angular 4 + Laravel 5 Error: The Resource you are Looking for has been Removed, had its name changed, or is temporarily unavailable

Asked

Viewed 159 times

0

I have a project in which I am using Angular 4 and Laravel 5.

Locally it is working locally but when I go up in production (I’m using Azure as a server) it doesn’t work properly.

I have a registration form and Angular. And by clicking on the "register" button this method is executed:

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 up in production, the console reported me this error when I clicked the "register":

"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 it does not work. How can I solve or circumvent this mistake?

  • You’ve already restarted the Azure App ?

  • Not yet. I’ll reset to see

  • I rebooted and it didn’t help..

  • This was an attempt I found here on Soen

  • See if this can help you laracasts

  • I inserted web.config into the wwwroot folder and restarted the application. But it didn’t work..

  • I tried to do as the person explained in: https://stackoverflow.com/questions/36962678/use-laravel-on-azure-webapp but it didn’t work either. I am inserting the web.config in the wrong folder?

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.