Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

moh120's avatar

PHP Fatal error: Uncaught Symfony\Component\Routing\Exception\RouteNotFoundException: Route [website.home] not defined. in C:\xampp\htdocs\darbi\darbi\vendor\laravel\framework\src\Illuminate\Routing\UrlGenerator.php:444


Route::controller(WebsiteController::class)->name('website.')->group(function () {
    Route::get('/', 'index')->name('home');
    Route::get('/about', 'about')->name('about');
    Route::get('/contact', 'contact')->name('contact');
    Route::get('/plans', 'pricing')->name('plan');
    Route::get('/plans/{label}', 'planDetails')->name('plan.details');
    Route::get('/faq', 'faq')->name('faq');
    Route::get('/terms-condition', 'termsCondition')->name('termsCondition');
    Route::get('/privacy-policy', 'privacyPolicy')->name('privacyPolicy');
    Route::get('/coming-soon', 'comingSoon')->name('comingsoon');
    Route::get('/jobs', 'jobs')->name('job');
    Route::get('/jobs/{job:slug}', 'jobDetails')->name('job.details');
    Route::get('/jobs/{job:slug}/bookmark', 'toggleBookmarkJob')->name('job.bookmark');
    Route::post('/jobs/apply', 'toggleApplyJob')->name('job.apply');
    Route::get('/candidates', 'candidates')->name('candidate');
    Route::get('/candidates/{candidate:username}', 'candidateDetails')->name('candidate.details');
    Route::get('/candidate/profile/details', 'candidateProfileDetails')->name('candidate.profile.details');
    Route::get('/candidate/application/profile/details', 'candidateApplicationProfileDetails')->name('candidate.application.profile.details');
    Route::get('/candidates/download/cv/{resume}', 'candidateDownloadCv')->name('candidate.download.cv');
    Route::get('/employers', 'employees')->name('company');
    Route::get('/employers/{user:username}', 'employersDetails')->name('employe.details');
    Route::get('/posts', 'posts')->name('posts');
    Route::get('/post/{post:slug}', 'post')->name('post');
    Route::post('/comment/{post:slug}/add', 'comment')->name('comment');
    Route::post('/markasread/single/notification', 'markReadSingleNotification')->name('markread.notification');
    Route::post('/set/session', 'setSession')->name('set.session');
    Route::post('/set/current/location', 'setCurrentLocation')->name('set.current.location');
    Route::get('/selected/country', 'setSelectedCountry')->name('set.country');
    Route::get('/selected/country/remove', 'removeSelectedCountry')->name('remove.country');
    Route::get('job/autocomplete', 'jobAutocomplete')->name('job.autocomplete');
});
0 likes
13 replies
vincent15000's avatar

Either the route doesn't exist => what do you see when you type this in a console ?

php artisan route:list | grep website

Or you have cached the routes and you need to cache them again.

php artisan route:cache
moh120's avatar

@vincent15000

Mollie\Api\Exceptions\ApiException 


  at C:\xampp\htdocs\darbi\darbi\vendor\mollie\mollie-api-php\src\MollieApiClient.php:411
    408▕         $apiKey = trim($apiKey);
    409▕ 
    410▕         if (! preg_match('/^(live|test)_\w{30,}$/', $apiKey)) {
  ➜ 411▕             throw new ApiException("Invalid API key: '{$apiKey}'. An API key must start with 'test_' or 'live_' and must be at least 30 characters long.");
    412▕         }
    413▕ 
    414▕         $this->apiKey = $apiKey;
    415▕         $this->oauthAccess = false;

  1   C:\xampp\htdocs\darbi\darbi\vendor\mollie\laravel-mollie\src\Wrappers\MollieApiWrapper.php:99
      Mollie\Api\MollieApiClient::setApiKey("")

  2   C:\xampp\htdocs\darbi\darbi\app\Http\Controllers\Payment\MollieController.php:16
      Mollie\Laravel\Wrappers\MollieApiWrapper::setApiKey("")

1 like
moh120's avatar

@parthjani7 PHP Fatal error: Uncaught ErrorException: Attempt to read property "page500_image" on null in C:\xampp\htdocs\darbi\darbi\storage\framework\views\856732c6e2a636d348ce4ce03e8b98a66ce3db67.php:49

1 like
moh120's avatar

@vincent15000

InvalidArgumentException 

  Unable to locate a class or view for component [backend.ad-manage].

  at C:\xampp\htdocs\darbi\darbi\vendor\laravel\framework\src\Illuminate\View\Compilers\ComponentTagCompiler.php:279
    275▕         if ($viewFactory->exists($view = $this->guessViewName($component).'.index')) {
    276▕             return $view;
    277▕         }
    278▕
  ➜ 279▕         throw new InvalidArgumentException(
    280▕             "Unable to locate a class or view for component [{$component}]."
    281▕         );
    282▕     }
    283▕

  1   C:\xampp\htdocs\darbi\darbi\vendor\laravel\framework\src\Illuminate\View\Compilers\ComponentTagCompiler.php:211
      Illuminate\View\Compilers\ComponentTagCompiler::componentClass("backend.ad-manage")

  2   C:\xampp\htdocs\darbi\darbi\vendor\laravel\framework\src\Illuminate\View\Compilers\ComponentTagCompiler.php:196
      Illuminate\View\Compilers\ComponentTagCompiler::componentString("backend.ad-manage", ["$ads", "false"])
1 like
vincent15000's avatar

@moh120 I asked you to know what you get when you type these commands.

php artisan route:list | grep website
php artisan route:cache

In which situation do you get this error message ?

moh120's avatar

@vincent15000

 php artisan route:list | grep website
grep : The term 'grep' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the 
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:26
+ php artisan route:list | grep website
+                          ~~~~
    + CategoryInfo          : ObjectNotFound: (grep:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

when php artisan route:list


   Mollie\Api\Exceptions\ApiException 

  [2023-01-05T16:54:05+0000] Invalid API key: ''. An API key must start with 'test_' or 'live_' and must be at least 30 characters long.  

  at C:\xampp\htdocs\darbi\darbi\vendor\mollie\mollie-api-php\src\MollieApiClient.php:411
    407▕     {
    408▕         $apiKey = trim($apiKey);
    409▕
    410▕         if (! preg_match('/^(live|test)_\w{30,}$/', $apiKey)) {
  ➜ 411▕             throw new ApiException("Invalid API key: '{$apiKey}'. An API key must start with 'test_' or 'live_' and must be at least 30 characters long.");
    412▕         }
    413▕
    414▕         $this->apiKey = $apiKey;
    415▕         $this->oauthAccess = false;

  1   C:\xampp\htdocs\darbi\darbi\vendor\mollie\laravel-mollie\src\Wrappers\MollieApiWrapper.php:99
      Mollie\Api\MollieApiClient::setApiKey("")

  2   C:\xampp\htdocs\darbi\darbi\app\Http\Controllers\Payment\MollieController.php:16
      Mollie\Laravel\Wrappers\MollieApiWrapper::setApiKey("")

1 like
vincent15000's avatar

@moh120 On your Mollie account, you got an API key.

You have to set this API key in your Laravel application.

Are you using a specific package to integrate Mollie in your project ? Or have you written all the code yourself ?

If you are using a package, you have probably a documentation which will help you. In both cases, you have to write the API key either in the .env file and then retrieve it in a configuration file or write it directly in a configuration file.

Then at any place in your code you can use the value of the API key using the config() helper.

https://laravel.com/docs/9.x/helpers#method-config

1 like

Please or to participate in this conversation.