src/SweetAlert.php
public function message($title='', $text='', $type='', $options=[])
    {
        $this->params['title'] = $title;
        $this->params['text'] = $text;
        $this->params['type'] = $type;
        if (isset($options)) {
            $this->params = array_merge($this->params, $options);
        }

        
        session()->flash('sweetalert.json', json_encode($this->params));

        return $this;
    }
public function message($title='', $text='', $type='', $options=[])
    {
        $this->params['title'] = $title;
        $this->params['text'] = $text;
        $this->params['type'] = $type;
        if (isset($options)) {
            $this->params = array_merge($this->params, $options);
        }

        
        session()->flash('sweetalert.json', json_encode($this->params));

        return $this;
    }
public function message ( $ title = '' , $ text = '' , $ type = '' , $ options = [ ] ) { $ this -> params [ 'title' ] = $ title ; $ this -> params [ 'text' ] = $ text ; $ this -> params [ 'type' ] = $ type ; if ( isset ( $ options ) ) { $ this -> params = array_merge ( $ this -> params , $ options ) ; } session ( ) -> flash ( 'sweetalert.json' , json_encode ( $ this -> params ) ) ; return $ this ; }
Send Message to SweetAlert2. With full configuration possible.
@param  title string
@param  text string
@param  type string
@param  options array
@return object
Send Message to SweetAlert2 . With full configuration possible .