Skip to content

Instantly share code, notes, and snippets.

View anabeto93's full-sized avatar

Richard Anabeto Opoku anabeto93

View GitHub Profile
@artoodetoo
artoodetoo / example.php
Created January 20, 2019 10:27
Laravel: run standalone console script without touching the project code
<?php
/*
* The code mostly peeped in artisan executable file.
* Put this file to project root (one level above DocumentRoot) and run
* $ php example.php
*/
if (php_sapi_name() !== 'cli') {
die('This file can be executed from console only');
}