Laravel has the following built-in npm run
commands (among others):
npm run install
npm run watch
Is it possible to create custom npm run
commands to run custom PHP scripts? For example, I want to create a command called npm run csv
that will run a PHP script that imports a bunch of CSV data into a database.
Thanks.
Edit: After asking the question and seeing a lot of the responses, it has become overwhelming obvious that writing a php artisan
command is probably the better way to go. As such, that's what I will do.
Thank you all for your responses. As for why I didn't ask that question, it's quite simple: I didn't know that that was a better approach. I'm still new to Laravel and learning. Thanks.