Unfortunately is not good idea — to inject Illuminate\Auth\AuthManager Illuminate\Filesystem\FilesystemManager, it make hard dependencies on Illuminate packages, because they are not contracts, but classes dependent \Illuminate\Foundation\Application.
For framework -agnostic cases the best way for inject Storage is use League\Flysystem\FilesystemInterface and own interface realisation with implementation that will wrap AuthManager parts that neccessary for business logic, often will enough something like

CurrentUserInterface{

public function isAuthorized():bool;

public function getId():int;
public function getName():string;

public function getIdentity():object;
public function can(string $action):bool;

}

Otherwise, there are not big profits from injection of framework-dependent classes instead of usage Facade Accessors

#php,#yii,#laravel,#javascript, #python,#linux,#archlinux,#vue

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store