public function setIsPublishAttribute($is_publish)
    {
        $this->attributes['is_publish'] = $is_publish == 1 || $is_publish === 'true' || $is_publish === true ? true : false;
    }
public function setIsPublishAttribute($is_publish)
    {
        $this->attributes['is_publish'] = $is_publish == 1 || $is_publish === 'true' || $is_publish === true ? true : false;
    }
public function setIsPublishAttribute ( $ is_publish ) { $ this -> attributes [ 'is_publish' ] = $ is_publish == 1 || $ is_publish === 'true' || $ is_publish === true ? true : false ; }
Set the is_publish attribute.

@param boolean $is_publish
@return string
Set the is_publish attribute .