[Vuejs]-"Post method not allowed" error in Tinymce image upload

0👍

Change in your route file and save it like this,

Route::get('/news-events/store', 'NewsEventsController@storeNewsEvent')->name('admin.news-event-store');
Route::post('/uploadimag-news', 'NewsEventsController@upload');

by default tinymce send a post request in your provided upload url.

here is the docs of tinymce: https://www.tiny.cloud/docs/tinymce/6/upload-images/

0👍

Update your VerifyCsrToken.php file.

add the path in except array.

protected $except = [
     //
     '/uploadimag-news',       
];

And you route should be post method.
cause tinyMCE send post request to the path.

Route::post('/uploadimag-news', [NewsEventsController::class, 'upload']);

Leave a comment