欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

          快速解決laravel9提示“Target *classController does not exist”問題!

          本篇文章給大家?guī)砹岁P于Laravel的相關知識,其中主要給大家介紹在Laravel9中提示了Target *classController does not exist,該怎么辦?下面一起來看一下解決方案,希望對需要的朋友有所幫助。

          快速解決laravel9提示“Target *classController does not exist”問題!

          關于 laravel 9 提示 Target *classController does not exist

          關于 laravel 9 api 提示 Target class [App\Http\Controllers\CaptchasController] does not exist 解決方法

          1. 打開 appProvidersRouteServiceProvider.php 修改如圖

          class RouteServiceProvider extends ServiceProvider {    .    .    .    .    .    protected $namespace ='App\Http\Controllers';   public  function boot()    {          $this->configureRateLimiting();          $this->routes(function () {             Route::middleware('api')                 ->prefix('api')                 ->namespace($this->namespace)                 ->group(base_path('routes/api.php'));             Route::middleware('web')             ->namespace($this->namespace)             ->group(base_path('routes/web.php'));         });     } }
          登錄后復制

          2. 打開 appProvidersRouteServiceProvider.php 修改如圖

          <?php use IlluminateHttpRequest; use IlluminateSupportFacadesRoute; //use AppHttpControllersApiCaptchasController; Route::prefix('v1')     ->name('api.v1.')     ->namespace("Api")//添加命名空間     ->group(function () {          Route::middleware('throttle:'.          config('api.rate_limits.sign'))         ->group(function () {            // Route::post('captchas', [CaptchasController::class, 'store'])->name('captchas.store'); ---原來的               Route::post('captchas', 'CaptchasController@store')               ->name('captchas.store');// 修改成這樣即可      });            Route::middleware('throttle:' .config('api.rate_limits.access'))             ->group(function () {             });     })
          登錄后復制

          推薦學習:《laravel視頻教程》

          贊(0)
          分享到: 更多 (0)
          網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號