亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

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

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

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

    關(guān)于 laravel 9 提示 Target *classController does not exist

    關(guān)于 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'));         });     } }
    登錄后復(fù)制

    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 () {             });     })
    登錄后復(fù)制

    推薦學(xué)習(xí):《laravel視頻教程》

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