作者:defenestrato
项目:groi
/**
* Create a new installer instance.
*
* @param \Illuminate\Console\Command $command
* @return void
*/
public function __construct($command)
{
$this->command = $command;
$this->command->line('Installing JavaScript & Less Assets: <info>✔</info>');
$this->command->line('Installing Language Files: <info>✔</info>');
$this->command->line('Installing Views: <info>✔</info>');
}
作者:klsandbo
项目:SmsManage
private function getMessage($route, $target_id, \Illuminate\Database\Eloquent\Model $user, \Illuminate\Console\Command $command)
{
$url = $route . '/' . $user->id . '/' . $target_id;
$request = Request::create($url, 'GET');
Input::initialize([]);
if ($command->option('verbose')) {
$command->comment('route:' . $route);
}
$item = $this->router->dispatch($request)->getOriginalContent();
if ($item === null) {
return;
}
$view = 'sms.' . $route;
$message = view($view, ['item' => $item]);
if (Config::get('sms-manager.prefix')) {
$message = Config::get('sms-manager.prefix') . $message;
}
$adminPhone = Config::get('sms-manager.admin_phone');
$receiver_number = $adminPhone ? $adminPhone : $user->phone;
$to = $user->name;
// HACKHACK: Needs to update the database instead
if ($receiver_number[0] != '6') {
$receiver_number = '6' . $receiver_number;
}
return (object) ['to' => $to, 'receiver_number' => $receiver_number, 'message' => $message];
}
作者:aindon
项目:pluggable
/**
* Generate pluggable folders and files.
*
* @param \Aindong\Pluggables\Console\PluggableMakeCommand $console
*
* @return bool
*/
public function generate(Command $console)
{
$this->generateFolders();
$this->generateGitkeep();
$this->generateFiles();
$console->info("Pluggable [{$this->name}] has been created successfully.");
return true;
}
作者:SocietyCM
项目:Cor
/**
* Fire the install script.
*
* @param Command $command
*
* @return mixed
*/
public function fire(Command $command)
{
if ($command->option('verbose')) {
$command->blockMessage('Seeds', 'Running the module seeds ...', 'comment');
}
$this->demoSeedCoreModules($command);
$this->demoSeedAdditionalModules($command);
}
作者:Houbs
项目:Cor
/**
* Fire the install script
* @param Command $command
* @return mixed
*/
public function fire(Command $command)
{
if ($command->option('verbose')) {
$command->call('key:generate');
return;
}
$command->callSilent('key:generate');
}
作者:defenestrato
项目:groi
/**
* Create a new installer instance.
*
* @param \Illuminate\Console\Command $command
* @return void
*/
public function __construct($command)
{
$this->command = $command;
$this->command->line('Updating Routes File: <info>✔</info>');
$this->command->line('Updating Controllers: <info>✔</info>');
$this->command->line('Updating Middleware: <info>✔</info>');
$this->command->line('Updating HTTP Kernel: <info>✔</info>');
}
作者:acmad
项目:modules-
/**
* @param Command $console
* @return bool
*/
protected function generate(Command $console)
{
$this->generateFolders();
$this->generateFiles();
$console->call('module:seed-make', array('module' => $this->name, 'name' => $this->Name, '--master'));
$console->call('module:controller', array('module' => $this->name, 'controller' => $this->Name . 'Controller'));
$console->info("Module [{$this->Name}] has been created successfully.");
return true;
}
作者:SocietyCM
项目:Cor
/**
* Fire the install script.
*
* @param Command $command
*
* @throws Exception
*
* @return mixed
*/
public function fire(Command $command)
{
$this->command = $command;
if ($command->option('verbose')) {
$command->blockMessage('Requirements', 'Checking System Requirements ...', 'comment');
}
$this->checkPHPVersion();
$this->checkExtensions();
$this->showResults();
}
作者:fabriciorabel
项目:module
/**
* Fire off the handler.
*
* @param \Illuminate\Console\Command $console
* @param string $slug
* @param string $class
* @return bool
*/
public function fire(Command $console, $slug, $class)
{
$this->console = $console;
$this->moduleName = Str::studly($slug);
$this->className = studly_case($class);
if ($this->module->exists($slug)) {
$this->makeFile();
return $this->console->info("Created Module Controller: [{$slug}] " . $this->getFilename());
}
return $this->console->info("Module [{$slug}] does not exist.");
}
作者:acmad
项目:modules-
/**
* Fire.
*
* @param Command $console
* @param $module
* @param $name
* @return mixed|void
*/
public function fire(Command $console, $module, $name)
{
$this->console = $console;
$this->moduleName = Str::studly($module);
$this->name = $name;
$this->Name = Str::studly($name);
if ($this->module->has($this->moduleName)) {
return $this->makeSeeder();
}
$console->error("Module [{$this->moduleName}] does not exists.");
}
作者:illuminate
项目:larastalle
public function renderCommandField(Command $command)
{
while (true) {
$input = $command->choice($this->getConsoleLabel(), $this->get('choices', []), $this->get('default', null));
$validator = $this->getValidator($input);
if ($validator->passes()) {
return $input;
} else {
$command->error($validator->errors()->first());
}
}
}
作者:SocietyCM
项目:Cor
/**
* Fire the install script.
*
* @param Command $command
*
* @return mixed
*/
public function fire(Command $command)
{
$gitignorePath = base_path('.gitignore');
if (!$this->gitignoreContainsComposerLock($gitignorePath)) {
return;
}
$removeComposerLock = $command->confirm('Do you want to remove composer.lock from .gitignore ?', true);
if ($removeComposerLock) {
$out = $this->getGitignoreLinesButComposerLock($gitignorePath);
$this->writeNewGitignore($gitignorePath, $out);
}
}
作者:cloud5idea
项目:appki
/**
* Fire off the handler.
*
* @param \Illuminate\Console\Command $console
* @param string $slug
* @param string $class
* @return bool
*/
public function fire(Command $console, $slug, $name, $type)
{
$this->console = $console;
$this->moduleName = studly_case($slug);
$this->emailName = snake_case($name);
$this->type = $type;
if ($this->module->exists($this->moduleName)) {
$this->makeFile();
return $this->console->info("Created Module Email View: [{$this->moduleName}] " . $this->getFilename());
}
return $this->console->info("Module [{$this->moduleName}] does not exist.");
}
作者:illuminate
项目:larastalle
public function renderCommandField(Command $command)
{
while (true) {
$input = $command->secret($this->getConsoleLabel());
$validator = $this->getValidator($input);
if ($validator->passes()) {
return $input;
} else {
$command->error($validator->errors()->first());
}
}
}
作者:aindon
项目:pluggable
/**
* Fire off the handler.
*
* @param \Aindong\Pluggables\Console\PluggableMakeMigrationCommand $console
* @param string $slug
*
* @return string
*/
public function fire(Command $console, $slug, $table)
{
$this->console = $console;
$this->pluggableName = Str::studly($slug);
$this->table = strtolower($table);
$this->migrationName = snake_case($this->table);
$this->className = studly_case($this->migrationName);
if ($this->pluggable->exists($this->pluggableName)) {
$this->makeFile();
$this->console->info("Created Pluggable Migration: [{$this->pluggableName}] " . $this->getFilename());
return exec('composer dump-autoload');
}
return $this->console->info("Pluggable [{$this->pluggableName}] does not exist.");
}
作者:czi
项目:laravel-pxlcm
/**
* Returns whether there is user interaction available
*
* @return array
*/
public function isInteractive()
{
if (is_null($this->command)) {
return false;
}
return !(bool) $this->command->option('auto');
}
作者:mrterry
项目:module
/**
* Runs the generator.
*/
public function generate()
{
$this->createModulesDir();
$this->createFolders();
$this->createFiles();
$this->console->info("Your module [{$this->name}] has been generated.");
}
作者:ncrousse
项目:gencru
/**
*
*
* @param string $class
* @return void
*/
public function call($class)
{
$this->resolve($class)->run();
if (isset($this->command)) {
$this->command->getOutput()->writeln("<info>Gencrud:</info> {$class}");
}
}
作者:ralphowin
项目:restful-api-helpe
/**
* Run the list of enquires about the configurations
*
* @return array
*/
public function run()
{
foreach ($this->fields as $configuration => $value) {
$this->configurations[$configuration] = $this->origin->ask($value['question'], $value['default']);
}
return $this->configurations;
}
作者:bryanashle
项目:framewor
/**
* Seed the given connection from the given path.
*
* @param string $class
* @return void
*/
public function call($class)
{
$this->resolve($class)->__invoke();
if (isset($this->command)) {
$this->command->getOutput()->writeln("<info>Seeded:</info> {$class}");
}
}