I have an Eloquent Model called Surface which is dependent on a ZipCodeRepository object:
class Surface extends Model{ public function __construct(ZipCodeRep
In Laravel 5.7 you can use the global resolve(...) method. I don't think the global App is defined in more recent version of Laravel.
resolve(...)
App
$myService = resolve(ServiceName::class);
Resolving in Laravel docs