我想問下這個service你們是咋在controller里面使用的,是直接構(gòu)造注入嗎
public function edit(Request $request, FileService $fileService)
{
$file = $request->file('file');
$fileService->upload($file);
}
protected $cartService;
public function __construct(CartService $cartService)
{
$this->cartService = $cartService;
}
湊合用
個人做法之文件結(jié)構(gòu):
個人做法之層級引用: