Route [product.status] not defined - laravel

Route [product.status] not defined. (View: /home/zubair/htdocs/et-solves/cms/resources/views/cms/pages/home/home.blade.php)
please see error https://flareapp.io/share/4m4qvWPM
Route
Route::patch('/pages/product/status', 'HomeController#Status')->name('product.status');

I think so you are using prefix in your route group.
php artisan route:list --path=status
and check your route.

Related

Mixed Content, This request has been blocked; the content must be served over HTTPS , Laravel

I have this error one production env. only on some routes, I see no difference between the routes that works and the few of them that don't work. All my routes are in web.php, and in front I try to access via Vuejs/Axios.
Also, the both url from error when I try to access them I get to https://, even if I try http:// , I get redirect to https.
What I tried till now.
.env
APP_URL=https://my.url
web.php
URL::forceScheme('https'); //at the top of the file
App/Providers/AppServiceProvider
public function boot()
{
URL::forceScheme('https');
}
Also:
composer dump-autoload
php artisan cache:clear
php artisan config:clear
php artisan view:clear
php artisan route:clear
php artisan config:cache
npm run prod
I found a strange solution.
I changed the route name from random_question to random, also the controller method name that was show to random and works.

Laravel VerifyController does not exist

when write artisan command to see route list then saw verifyController does not exist
php artisan route:list
Class App\Http\Controllers\VerifyController does not exist
How can i solve this problem?Help me.Thanks.
I think you have "Route::get('some-route', 'VerifyController');" in routes/web.php and dont have VerifyController.php in App/Http/Controllers
You should create "VerifyController.php" or remove Route::get('some-route', 'VerifyController');" this line from routes/web.php

Laravel Route exist in artisan route:list but not in route files

When I am checking php artisan route:list, the route which i want to redirect is listed there.
for ex: admins.dashboard.panel
but I didn't found any related route in route code files.
And I have code in my LoginController as
return redirect()->route('admins.dashboard.panel');
which is redirecting to login page again.

Defining routes in api.php and web.php with same name

I have a route in my api.php file
Route::get('category/{id}/subcategory','SubcategoryController#categoryFinder')->name('cat_to_sub.find');
This route worked fine until i added another route in the web.php file
Route::get('category/{id}/subcategory',function(){return view('subcategories');});
And then when i run php artisan route:list
The URI api/category/{id}/subcategory has no name and i referenced that name all over my files and its throwing all these errors saying route cat_to_sub.find not defined
But when i remove the route in the web.php file everything works.
So whats causing this errors and is there another way to do it?

Laravel 5.4 php artisan route:list showing incorrect data after a route:clear

I have the following issue. I am running laravel 5.4 and have a problem with my routes, when I navigate to my '/about-me' of my predefined routes I get the error:
1/1 NotFoundHttpException in RouteCollection.php line 179:
However the route is defined as shows here:
Route::get('about-me', function () {
return view('about-me');
});
On my view the link is pointing to that route as shown:
About Me
I have cleared my cached routes in SSH using the command:
php artisan route:clear
When I list my routes using the command:
`php artisan route:list`
I see an old version of my routes file. So this is the problem, however whatever I try they are not updating. I have cleared the cache locally and within laravel and still the old file file is showing when I type the route:list command.
I believe the code is all correct, however the new updated route file which contains the defined route for about-me is not being used. I have attached an image of the updated routes file on the server also.
Here is a link to the screenshot. Screenshot of route file on server
Thanks
In Laravel 5.4 (or in earlier version, I'm not sure) routes has been moved to the separate folder in app/routes/web.php (as you can see here: https://github.com/laravel/laravel).
You can find routes registration in app/Providers/RouteServiceProvider.php (https://github.com/laravel/laravel/blob/master/app/Providers/RouteServiceProvider.php#L52)

Resources