--- /dev/null
+<?php
+
+
+namespace Cubist\Backpack\app\Console;
+
+use Cubist\Util\Files\Files;
+use Illuminate\Support\Facades\Artisan;
+use Illuminate\Console\Command;
+
+class CubistBackpackCommand extends Command
+{
+ /**
+ * The name and signature of the console command.
+ *
+ * @var string
+ */
+ protected $signature = 'cubist:magic:generate';
+
+ /**
+ * The console command description.
+ *
+ * @var string
+ */
+ protected $description = 'Generate Controllers, Requests, Routes, migrations according to magic';
+
+ /**
+ * Execute the console command.
+ *
+ * @return mixed
+ */
+ public function handle()
+ {
+ $name = ucfirst($this->argument('name'));
+
+ // Find cubistmagic directories
+ $iterator = Files::getDirectoryIterator(app_path(), true);
+ $magics = [];
+ foreach ($iterator as $item) {
+ /** @var $item \SplFileInfo */
+ if ($item->isDir() && $item->getFilename() == 'cubistmagic') {
+ $this->_handleMagicFolder($item);
+ }
+ }
+
+ }
+
+ protected function _handleMagicFolder(\SplFileInfo $item)
+ {
+ $this->line('Handling ' . $item->getPath());
+ }
+}