"cubist/cms-front": "dev-master",
"cubist/util": "dev-master",
"cubist/locale": "dev-master",
+ "cubist/laravel-backpack-dropzone-field": "dev-master",
"fideloper/proxy": "^4.2",
"predis/predis": "^1.1",
- "spatie/laravel-translatable": "^4.2",
- "venturecraft/revisionable": "^1.33",
- "cubist/laravel-backpack-dropzone-field": "dev-master",
- "cviebrock/eloquent-sluggable": "^6.0",
+ "spatie/laravel-translatable": "^4.3",
+ "venturecraft/revisionable": "^1.34",
+ "cviebrock/eloquent-sluggable": "^7.0",
"lavary/laravel-menu": "^1.7",
- "graham-campbell/markdown": "^11.0",
+ "graham-campbell/markdown": "^12.0",
"barryvdh/laravel-debugbar": "^3.2",
"league/commonmark-ext-autolink": "^1.0",
- "cviebrock/laravel-elasticsearch": "^4.1",
- "spatie/laravel-honeypot": "^1.4",
+ "cviebrock/laravel-elasticsearch": "^4.2",
+ "spatie/laravel-honeypot": "^2.1",
"chrisjean/php-ico": "^1.0",
"swayok/alternative-laravel-cache": "^5.4"
},
"require-dev": {
"filp/whoops": "^2.7",
- "laravel/tinker": "^2.1",
+ "laravel/tinker": "^2.2",
"barryvdh/laravel-ide-helper": "^2.6"
},
"extra": {
namespace Cubist\Backpack\app\Console\Commands;
-
-use Cubist\Backpack\app\Magic\Models\CubistMagicAbstractModel;
-use Cubist\Util\Files\Files;
-use Cubist\Util\PHP;
use Illuminate\Console\Command;
-use Illuminate\Support\Facades\App;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Process;
/**
* Run a SSH command.
*
- * @param string $command The SSH command that needs to be run
+ * @param string|array $command The SSH command that needs to be run
* @param bool $beforeNotice Information for the user before the command is run
* @param bool $afterNotice Information for the user after the command is run
*
{
$this->echo('info', $beforeNotice ? ' ' . $beforeNotice : $command);
- $process = new Process($command, null, null, null, 180, null);
+ if (is_string($command)) {
+ $command = [$command];
+ }
+
+ $process = new Process($command, null, null, null, 180);
$process->run(function ($type, $buffer) {
if (Process::ERR === $type) {
$this->echo('comment', $buffer);
$this->{$type}($content);
}
}
-
- protected function _handleMagicFolder($callback)
- {
- $magic = app_path() . '/Models';
-
- $this->line('Environment ' . App::environment());
-
- $iterator = Files::getDirectoryIterator($magic, true);
- foreach ($iterator as $item) {
- $this->line('Testing ' . $item);
- /** @var $item \SplFileInfo */
- if ($item->isFile() && $item->getExtension() == 'php') {
- try {
- $class = PHP::instanciateClassInFile($item);
- if ($class instanceof CubistMagicAbstractModel) {
- if (is_callable($callback)) {
- call_user_func($callback, $class);
- }
- }
- } catch (\Exception $e) {
- $this->line($e->getMessage());
- }
- }
- }
- }
}
--- /dev/null
+<?php
+
+
+namespace Cubist\Backpack\app\Console\Commands;
+
+use Cubist\Backpack\app\Magic\Models\CubistMagicAbstractModel;
+use Cubist\Util\Files\Files;
+use Cubist\Util\PHP;
+use Illuminate\Support\Facades\App;
+
+class CubistMagicCommand extends CubistCommand
+{
+ protected function _handleMagicFolder($callback)
+ {
+ $magic = app_path() . '/Models';
+
+ $this->line('Environment ' . App::environment());
+
+ $iterator = Files::getDirectoryIterator($magic, true);
+ foreach ($iterator as $item) {
+ $this->line('Testing ' . $item);
+ /** @var $item \SplFileInfo */
+ if ($item->isFile() && $item->getExtension() == 'php') {
+ try {
+ $class = PHP::instanciateClassInFile($item);
+ if ($class instanceof CubistMagicAbstractModel) {
+ if (is_callable($callback)) {
+ call_user_func($callback, $class);
+ }
+ }
+ } catch (\Exception $e) {
+ $this->line($e->getMessage());
+ }
+ }
+ }
+ }
+}
use Cubist\Backpack\app\Magic\Models\CubistMagicAbstractModel;
use Cubist\Backpack\app\Magic\Util;
-class GenerateCommand extends CubistCommand
+class GenerateCommand extends CubistMagicCommand
{
/**
* The name and signature of the console command.
<?php
+namespace Cubist\Backpack\app\Console\Commands;
-namespace Cubist\Backpack\app\Console\Command;
-
-use Cubist\Backpack\app\Console\Commands\CubistCommand;
use Cubist\Backpack\app\Magic\Models\CubistMagicAbstractModel;
use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Schema;
-class MigrateCommand extends CubistCommand
+class MigrateCommand extends CubistMagicCommand
{
/**
* The name and signature of the console command.
namespace Cubist\Backpack\app\Console\Commands;
-use Cubist\Backpack\app\Magic\Menu\Menu;
-use Cubist\Backpack\app\Magic\Menu\PageItem;
-use Cubist\Backpack\app\Magic\Menu\VirtualItem;
use Cubist\Backpack\app\Magic\Search;
-use Cubist\Backpack\app\Template\Navigation;
-use Cubist\Backpack\app\Template\Redirection;
-use Cviebrock\LaravelElasticsearch\Facade as Elasticsearch;
use Illuminate\Console\Command;
-use Cubist\Util\XML\DOMSelector;
class SearchIndexCommand extends Command