A custom service has been established through ServiceContainer and ServiceProvider. How to use dependency injection in the service, such as Request, User, Cookie, etc.
If you write User $user directly in the service method, the prompt is as follows:
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
Not introduced?
use AppUser