Closed AmirAmin closed 8 years ago
For ex. how can i get the process id of the following conversion command :
CloudConvert::file('xyz.mp3') ->callback('http://myserver.com/save_file.php') ->convert('wav');
Hello, please have a look at #26.
Worked Perfect,
I played around it by getting the list of the processes, Convert it into Collective, and select last element which is the recent converted as per the following:
$processes = collect(CloudConvert::processes()); $processId = $processes[count($processes) - 1]->id;
Thanks a lot bro.
Thanks @josiasmontag
@AmirAmin Good stuff. CloudConvert::processes()
already returns as Illuminate\Support\Collection
. So you could simplify your code to:
$processes = CloudConvert::processes();
$processId = $processes->last()->id;
See the Laravel docs: https://laravel.com/docs/master/collections#method-last
Hello,
Right now i would like to run a conversion command and return the process id to store it in the database, to compare it in the callback to get the download url for the process in case i am running more than one conversion.
Regards,