public function publishPostEvent(Request $request) {

        // Laravel's Mail::send second "data" param must be an array, not an object.
        $post                     = $this->model->FindOrFail($request->input('postID'))->toArray();
        $post['listID']           = $request->input('listID');
        $post['eventDescription'] = $request->input('eventDescription');

        event(new PublishThePost($post));

        $message =  "You successfully ".$post['eventDescription']."!";
        Session::flash('message', $message);
        Session::flash('status_code', 200 );

        return Redirect::route('admin.'.$this->model->resource_route_name.'.index');
    }
public function publishPostEvent(Request $request) {

        // Laravel's Mail::send second "data" param must be an array, not an object.
        $post                     = $this->model->FindOrFail($request->input('postID'))->toArray();
        $post['listID']           = $request->input('listID');
        $post['eventDescription'] = $request->input('eventDescription');

        event(new PublishThePost($post));

        $message =  "You successfully ".$post['eventDescription']."!";
        Session::flash('message', $message);
        Session::flash('status_code', 200 );

        return Redirect::route('admin.'.$this->model->resource_route_name.'.index');
    }
public function publishPostEvent ( Request $ request ) { // Laravel's Mail::send second "data" param must be an array, not an object. $ post = $ this -> model -> FindOrFail ( $ request -> input ( 'postID' ) ) -> toArray ( ) ; $ post [ 'listID' ] = $ request -> input ( 'listID' ) ; $ post [ 'eventDescription' ] = $ request -> input ( 'eventDescription' ) ; event ( new PublishThePost ( $ post ) ) ; $ message = "You successfully " . $ post [ 'eventDescription' ] . "!" ; Session :: flash ( 'message' , $ message ) ; Session :: flash ( 'status_code' , 200 ) ; return Redirect :: route ( 'admin.' . $ this -> model -> resource_route_name . '.index' ) ; }
Fire the SendPostToLaSalleCRMemailList event.

This method is called from the confirmation view in the LaSalle List Management package.

@param   Request $request
@return  mixed
Fire the SendPostToLaSalleCRMemailList event .