Slide 5
Slide 5 text
LA BASE : LA COMMANDE
➤ La définition d’une commande est toujours aussi simple
➤ Une commande est un callable // Closure
$app->command('foo', function () {
// ...
});
// A function
$app->command('foo', ‘someFunction');
// An object implementing __invoke()
$app->command('foo', new InvokableObject());
// An object method
$app->command('foo', [$object, 'method']);
// A static class method
$app->command('foo', ['MyClass', 'method']);