#Do something after run command.
11 messages · Page 1 of 1 (latest)
This sounds a bit like an XY problem, what's the use-case here?
I'm creating a composer package, however, to show my assets I'm linking them inside the storage/app/public folder.
So far so good, except that when I run storage:link I want it to link my assets within the public storage.
I could ask to user link the folders like the documentation:
https://laravel.com/docs/10.x/filesystem#the-public-disk
But I want to abstract and my package do this after run storage:link, do you got it?
Why'd you do that through a storage disk tho? If you're just dealing with assets there's way better approaches; https://www.laravelpackage.com/16-assets/
That's basically how Laravel's first party packages do that as well
I don't want to have to create a symbolic folder, for example public/modules, and ask the user to ignore it in versioning. As storage is already being ignored, I wanted to take advantage of it.
Yeah, and it's honestly a horrible approach
Like I said, there are existing solutions
A multitude of packages take the approach I mentioned, since it's the default on how to do that sort of stuff. People using your package are probably familiar with that, since most packages take that approach. You're overcomplicating it waaaaay too much
And that approach doesn't deal with symlinks at all