A Laravel PHP library for processing code in the background.
This package uses a new ability in Laravel to serialize closures, which can then be executed in the command line in the background asynchronously.
Normal install via Composer.
Register the commands in your app/start/artisan.php
file:
Artisan::add(new Travis\Fork\Commands\ForkCommand);
Just fork the code you want to run in the background:
Fork::run(function() use($foobar)
{
// do stuff
});
If you want to test for errors, you can run your code synchronously:
Fork::test(function() use($foobar)
{
// do stuff
});