public function send(SenderManagerContract $sender)
    {
        $model = app('notifynder.resolver.model')->getModel(Notification::class);
        $table = (new $model())->getTable();

        $this->database->beginTransaction();
        $stackId = $this->database
                ->table($table)
                ->max('stack_id') + 1;
        foreach ($this->notifications as $key => $notification) {
            $this->notifications[$key] = $this->notifications[$key]->toDbArray();
            $this->notifications[$key]['stack_id'] = $stackId;
        }
        $insert = $this->database
            ->table($table)
            ->insert($this->notifications);
        $this->database->commit();

        return (bool) $insert;
    }
public function send(SenderManagerContract $sender)
    {
        $model = app('notifynder.resolver.model')->getModel(Notification::class);
        $table = (new $model())->getTable();

        $this->database->beginTransaction();
        $stackId = $this->database
                ->table($table)
                ->max('stack_id') + 1;
        foreach ($this->notifications as $key => $notification) {
            $this->notifications[$key] = $this->notifications[$key]->toDbArray();
            $this->notifications[$key]['stack_id'] = $stackId;
        }
        $insert = $this->database
            ->table($table)
            ->insert($this->notifications);
        $this->database->commit();

        return (bool) $insert;
    }
public function send ( SenderManagerContract $ sender ) { $ model = app ( 'notifynder.resolver.model' ) -> getModel ( Notification :: class ) ; $ table = ( new $ model ( ) ) -> getTable ( ) ; $ this -> database -> beginTransaction ( ) ; $ stackId = $ this -> database -> table ( $ table ) -> max ( 'stack_id' ) + 1 ; foreach ( $ this -> notifications as $ key => $ notification ) { $ this -> notifications [ $ key ] = $ this -> notifications [ $ key ] -> toDbArray ( ) ; $ this -> notifications [ $ key ] [ 'stack_id' ] = $ stackId ; } $ insert = $ this -> database -> table ( $ table ) -> insert ( $ this -> notifications ) ; $ this -> database -> commit ( ) ; return ( bool ) $ insert ; }
Send all notifications.

@param SenderManagerContract $sender
@return bool
Send all notifications .