Answer the question
In order to leave comments, you need to log in
Route is undefined when is it declared?
OpenServer, Windows 10, PhPStrom 2017.
The situation arises with newly minted and modified routes.
We declare a Route in the web.php file.
Route::group(['prefix' => 'videos'], function () {
Route::post('', 'Document\[email protected]')->name('document.videos.store');
add() {
Slc.post(laroute.route('document.videos.store'), this.form)
.then((response) => {
alert('1233');
TypeError: Cannot read property 'protocol' of undefined
at isURLSameOrigin (app.467c5b6….js:41691)
at dispatchXhrRequest (app.467c5b6….js:40404)
at Promise (<anonymous>)
at xhrAdapter (app.467c5b6….js:40308)
at dispatchRequest (app.467c5b6….js:41297)
// все разом, прошелся по всем
1 - очистил полностью кеш браузера
2- composer dump-autoload
3- php artisan cache:clear
4- php artisan route:clear
5- php artisan laroute:generate // необходимо юзать после создания новых Route, для индексации
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question