[Vuejs]-Laravel vue โ€“ axios's methods not working correctly after upload project

0๐Ÿ‘

โœ…

I solved problem!

Firstly I needed to separate methods in my web.php file like this:

Route::post('/api/newsAdd', 'NewsController@store');

that was before:

Route::resource('api/news', 'NewsController');

Sedcondly there was a problem with slashes:

before: axios.post('api/newsAdd/', this.info)

after: axios.post('api/newsAdd', this.info)

Leave a comment