In Laravel 5, it really depends on what $data. If it is an array and you want the Laravel map to automatically display, you would do something like this:
$this->dispatchFromArray('App\Commands\SendReminderPush', $data);
Say yours $datalooks like this:
$data = array('name' => 'Test', 'email' => 'test@example.com');
In yours SendReminderPushyou should map this in the constructor:
public function __construct($name, $email) {
$this->name = $name;
$this->email = $email;
}
( ) :
public function handle(){
$this->doSomething($this->name);
}
, Command Bus Laravel 5.