1. Go to this page and download the library: Download wizory/llock library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wizory / llock example snippets
php artisan llock:install
bash
LOCKNAME=mysite
php artisan llock:set --wait ${LOCKNAME} # command will not return until a lock is obtained or the timeout is reached
# deploy steps here....
php artisan llock:free ${LOCKNAME}
bash
php artisan llock:set mysite && php artisan schedule:run; php artisan llock:free mysite
# or the mostly equivalent
if php artisan llock:set mysite; then php artisan run; fi; php artisan llock:free mysite