I'm using Laravel tinker to run my script
use Spatie\Browsershot\Browsershot;
$namafile = 'foto.jpeg';
$selectorIndex = '0';
$path = storage_path().'/app/'.$namafile;
Browsershot::url('http://127.0.0.1:8000/ds_rev_daily_l2')->select('.print', $selectorIndex)->setDelay(20000)->save($path);
I want to run script above with CMD Commands After Batch Script.
How can the script run from single click at .bat file?
Running the script from tinker from CMD Commands After Batch Script
You can use Tinker's
executeoption to execute the given code.Here's a sample in bash:
Despite this option, we can create a batch file like the one below: