Advertisement
Guest User

Untitled

a guest
May 18th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. $event = $container->get('event');
  2. $event->on('cli.commands',function($console){
  3. // you can now bind a route to the console //
  4. $console->command('users:add',function($arguments) {
  5. //$arguments come from the command line like this...
  6. // php run users:add --username="cannap" --password="dp"
  7. // $arguments['username']=cannap;
  8. // $arguments['password']="dp";
  9. $users = $this->get('users'); // get a pre registered service container class under users
  10. return $users->addUser($arguments);
  11. };
  12. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement