Quickly query and display Propel entities from the CLI.
Add the PropelDumpEntityConsole
to your ConsoleDependencyProvider
:
<?php
namespace Pyz\Zed\Console;
// ...
use Inviqa\Zed\SprykerDebug\Communication\Console\PropelDumpEntityConsole;
class ConsoleDependencyProvider extends SprykerConsoleDependencyProvider
{
// ...
protected function getConsoleCommands(Container $container)
{
return [
// ...
new PropelDumpEntityConsole(),
];
}
}
Show product by SKU:
$ ./vendor/bin/console debug:propel:entity SpyProduct --by=sku:ABC-1234
Select all SpyCustomer
records:
$ ./vendor/bin/console debug:propel:entity SpyCustomer
Limit records by 1:
$ ./vendor/bin/console debug:propel:entity PyzTestEntity --limit=1
Display rows as individual records:
$ ./vendor/bin/console debug:propel:entity PyzTestEntity --records