Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $event = $container->get('event');
- $event->on('cli.commands',function($console){
- // you can now bind a route to the console //
- $console->command('users:add',function($arguments) {
- //$arguments come from the command line like this...
- // php run users:add --username="cannap" --password="dp"
- // $arguments['username']=cannap;
- // $arguments['password']="dp";
- $users = $this->get('users'); // get a pre registered service container class under users
- return $users->addUser($arguments);
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement