Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

meenctg's avatar

php artisan tinker run with node child process spawn

I know that this is the command for running a file in artisan tinker.

more test.php | php artisan tinker

I want to run this command with node js child process spawn.

var spawn = require('child_process').spawn;
var cmd = spawn('php',['artisan','tinker']);

but I can't figure out how i can run entire more test.php | php artisan tinker in spawn?

0 likes
0 replies

Please or to participate in this conversation.