Skip to content

tons of helper you need for you artisan command line application

License

Notifications You must be signed in to change notification settings

queents/console-helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Console Helpers

tons of helper you need for you artisan command line application

Installation

composer require queents/console-helpers

Usage

we have a Traits that you can use in your artisan command class

Run PHP Command

you can run direct php command like this

use Queents\ConsoleHelpers\Traits\RunCommand;

class MyCommand extends Command{
    use RunCommand;
}
$this->phpCommand('echo "welcome";');

Run Yarn Command

you can run direct yarn command like this

use Queents\ConsoleHelpers\Traits\RunCommand;

class MyCommand extends Command{
    use RunCommand;
}
$this->yarnCommand('echo "welcome";');

NOTE

you can update yarn path from config file.

Run Artisan Command

you can direct run artisan command by using this method

use Queents\ConsoleHelpers\Traits\RunCommand;

class MyCommand extends Command{
    use RunCommand;
}
$this->artisanCommand('migrate');

Handle Stubs File Template

you can handle stubs file template and copy change or add new data by using this method

use Queents\ConsoleHelpers\Traits\HandleStubs;

class MyCommand extends Command{
    use HandleStubs;
}
$this->generateStubs(
    __DIR__ . "/stubs/SettingsClass.stub",
    "Modules/Base/Settings/MainSettings.php",
    [
        "settingName" => "site_url",
        "moduleName" => "Base",
        "settingField" => Str::lower("site_url")
    ],
    [
        "Modules/Base/Settings/"
    ]
);

Handel Modules Actions

this command is working with laravel-modules you can active all modules or stop all modules or active selected module by this methods

use Queents\ConsoleHelpers\Traits\HandleModules;

class MyCommand extends Command{
    use HandleModules;
}
$this->activeAllModules();
$this->stopAllModules();

this method take 2 parameter first is module name and second is active/stop bool by default is true

$this->activeModule("Base");

Support

you can join our discord server to get support VILT Admin

Docs

look to the new docs of v4.00 on my website Docs

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

tons of helper you need for you artisan command line application

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages