Laravel Türkiye Discord Kanalı Forumda kod paylaşılırken dikkat edilmesi gerekenler!Birlikte proje geliştirmek ister misiniz?

1 rotam çalışmıyor. php artisan optimize kodunu çalıştırdıgımda. Aşağıdaki hata mesajını alıyorum. bu rotadan 2 tane var gibi birşey diyor ama web.php de 1 tane tanımlı.

config ................................................................................................... 22ms DONE
routes ................................................................................................... 11ms FAIL

LogicException

Unable to prepare route [verify-email] for serialization. Another route has already been assigned name [verification.notice].

at vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php:247
243▕ $route->name($this->generateRouteName());
244▕
245▕ $this->add($route);
246▕ } elseif (! is_null($symfonyRoutes->get($name))) {
➜ 247▕ throw new LogicException("Unable to prepare route [{$route->uri}] for serialization. Another route has already been assigned name [{$name}].");
248▕ }
249▕
250▕ $symfonyRoutes->add($route->getName(), $route->toSymfonyRoute());
251▕

  +34 vendor frames

35 artisan:37
Illuminate\Foundation\Console\Kernel::handle()

    aeneas Another route has already been assigned name [{$name}] şu dikkatimi çekti. Web.php içerisinde çakışma olabilir diye düşünüyorum birde route:clear optimize:clear yaptınız mı?

    route:clear da optimize:clear da yaptım. web.php deki her seyi kontrol ettim hiç bir sorun yok

      aeneas Yani tam emin değilim ama iki kere verify-email adında rota tanımlamışsınız gibi sanki hata mesajında, veya siz tanımlamamışsınızda kullandığınız bir paket bunu kullanıyor olabilir, bence bir tanesini değiştirip tekrar deneyin

      çalışmayan rotayı strage views ıcındekı tum dosyları sılerek calıstırdım ama php artisan optimize hala aynı hatayı verıyor

      aeneas php artisan route:list yapın fotosunu çekip atın
      Another route has already been assigned name [verification.notice].
      diyor aynı isim verilmiş onu bulup değiştirin

      email verificationu aktif ederken yönergeleri izledim ve web.php rotalarına aşağıdakileri ekledim.

      Route::get('/email/verify', function () {
          return view('auth.verify-email');
      })->middleware('auth')->name('verification.notice');
      
      Route::get('/email/verify/{id}/{hash}', function (EmailVerificationRequest $request) {
          $request->fulfill();
          return redirect('/');
      })->middleware(['auth', 'signed'])->name('verification.verify');
      
      Route::post('/email/verification-notification', function (Request $request) {
          $request->user()->sendEmailVerificationNotification();
      
          return back()->with('message', 'Verification link sent!');
      })->middleware(['auth', 'throttle:6,1'])->name('verification.send');

      ama auth.php dede aynı namede rotalar var.

      Route::middleware('auth')->group(function () {
          Route::get('verify-email', EmailVerificationPromptController::class)
                      ->name('verification.notice');
      
          Route::get('verify-email/{id}/{hash}', VerifyEmailController::class)
                      ->middleware(['signed', 'throttle:6,1'])
                      ->name('verification.verify');
      
          Route::post('email/verification-notification', [EmailVerificationNotificationController::class, 'store'])
                      ->middleware('throttle:6,1')
                      ->name('verification.send');

      web.php dekılerı kaldırmam mı gerek

        aeneas auth.php de isimlendirmeni değiştirin mesela

        auth.php

        
        Route::middleware('auth')->group(function () {
            Route::get('verify-email', EmailVerificationPromptController::class)
                        ->name('verification.notice-auth');
        
            Route::get('verify-email/{id}/{hash}', VerifyEmailController::class)
                        ->middleware(['signed', 'throttle:6,1'])
                        ->name('verification.verify-auth');
        
            Route::post('email/verification-notification', [EmailVerificationNotificationController::class, 'store'])
                        ->middleware('throttle:6,1')
                        ->name('verification.send-auth');
        }