php - Bootstrapping data on server starts in Laravel4 -


in laravel app, need add logic called once server starts (i.e. bootstrapping data, preload cache). i've tried injecting code in start.php, being called on every client request.

as workaround, using artisan custom command so, want automate logic on every deployment apache server.

what i've seen done before set file similar how wp / laravel handle maintenance mode generating placeholder file, if file exists puts site maintenance mode, same deployment, create dummy file, , when bootstraps scripts run, have unlink() / destroy file, check if file_exists() run bootstrap data. if file doesn't exist assumes bootstrap has run , never executes until deploy again in case push dummy file again.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -