nojacko / laravel-tools
Jacko's Laravel Tools.
This package's canonical repository appears to be gone and the package has been frozen as a result.
dev-master
2016-11-12 16:18 UTC
Requires
- php: >=5.5.9
- laravel/framework: 5.*
- league/climate: ^3.2
Requires (Dev)
- fzaninotto/faker: ~1.4
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~4.0
- symfony/css-selector: 2.8.*|3.0.*
- symfony/dom-crawler: 2.8.*|3.0.*
This package is not auto-updated.
Last update: 2021-01-22 23:05:15 UTC
README
Bunch of things I use in Laravel.
Database
Optimizer
Runs OPTIMIZE TABLE
on all tables in all you MySQL connections.
# Kernel.php
protected $commands = [
\JackosLaravelTools\Console\Commands\DatabaseOptimize::class,
];
# Command
php artisan database:optimize
Wait
Repeatedly tries to query your database for --wait
seconds before dying.
# Kernel.php
protected $commands = [
\JackosLaravelTools\Console\Commands\DatabaseWait::class,
];
# Command
php artisan database:wait {--wait=10}
Base Console Class
An extension of Illuminate\Console\Command
with useful functions and instantiates.
use JackosLaravelTools\Console\Commands\Base;
namespace JackosLaravelTools\Console\Commands;
class DatabaseWait extends Base
{
// Instance of `\League\CLImate\CLImate`
protected $cli;
// Prints "$this->name: $this->description".
public function printIntro();
// Prints "$this->name: $message".
public function printLog($message = '');
// Prints "$this->name: DONE".
public function printOuttro();
}