首页 > 其他分享 >laravel: 报错: Target class [view] does not exist.

laravel: 报错: Target class [view] does not exist.

时间:2024-09-26 15:44:48浏览次数:8  
标签:laravel Container Target DONE api 报错 Illuminate php

一,报错信息:

Next Illuminate\\Contracts\\Container\\BindingResolutionException: 
Target class [view] does not exist. in /web/api/vendor/laravel/framework/src/Illuminate/Con
tainer/Container.php:940
Stack trace:
#0 /web/api/vendor/laravel/framework/src/Illuminate/Container/Container.php(815): Illuminate\\Container\\Container->build()
#1 /web/api/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1046): Illuminate\\Container\\Container->resolve()
#2 /web/api/vendor/laravel/framework/src/Illuminate/Container/Container.php(751): Illuminate\\Foundation\\Application->resolve() 

 上次出现时,vendor/laravel/ui因git冲突此目录下无文件,
这一次出现时,此目录下的库文件是存在的

二,解决:

执行下面两个命令后恢复正常:

php artisan package:discover

[lhd@web api]$ php artisan package:discover

   INFO  Discovering packages.

  laravel/sail ................................................................................................................................ DONE
  laravel/sanctum ............................................................................................................................. DONE
  laravel/tinker .............................................................................................................................. DONE
  laravel/ui .................................................................................................................................. DONE
  nesbot/carbon ............................................................................................................................... DONE
  nunomaduro/collision ........................................................................................................................ DONE
  nunomaduro/termwind ......................................................................................................................... DONE

 php artisan key:generate

[lhd@web api]$  php artisan key:generate


                                                                            APPLICATION IN PRODUCTION.


 ┌ Are you sure you want to run this command? ──────────────────┐
 │ Yes                                                          │
 └──────────────────────────────────────────────────────────────┘

   INFO  Application key set successfully.

 

标签:laravel,Container,Target,DONE,api,报错,Illuminate,php
From: https://www.cnblogs.com/architectforest/p/18433581

相关文章