透過ServiceContainer, ServiceProvider, 建立了一個自訂的服務,請問如何在服務中使用依賴注入,例如 Request, User,Cookie等
##如果直接在服務的方法中寫入User $user ,提示如下:
Argument 1 passed to App\Services\UserService::register() must be an instance of App\User, none given, called in /home/vagrant/Code/zhicheauto/car-server/app/Api /Controllers/UsersController.php on line 32 and defined
沒引入?
use AppUser