curl https://drupalconsole.com/installer -L -o drupal.phar
$ mv console.phar /usr/local/bin/drupal
<?php | |
use Illuminate\Database\Eloquent\Builder; | |
Builder::macro('toSqlWithBindings', function () { | |
$bindings = array_map( | |
fn ($value) => is_numeric($value) ? $value : "'{$value}'", | |
$this->getBindings() | |
); |
/** | |
* Find the amount of auto-increment "space" has been used. This may can help identify | |
* tables that are running out of available ID values. | |
*/ | |
SELECT | |
t.table_name, | |
t.column_name, | |
-- The highest possible ID that can be created with this data-type. | |
t.max_value, | |
-- The last ID created in this table. |
{ | |
"registrar": [ | |
{ | |
"provider": "class", | |
"language": "php", | |
"signatures": [ | |
{ | |
"class": "FooClass", | |
"method": "foo", | |
"type": "type" |
While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.
Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.
lib/
is intended for code that can run as-issrc/
is intended for code that needs to be manipulated before it can be used