How to pass array to flash message?
<p>I want to send array of additional_feature that they are exist to flash message. Now i only send one additional_feature. Any suggestion how can i do that?</p>

<pre><code> if(!empty($additional_features)){
          foreach($additional_features as $additional_feature){
            $data = [
               'name' =&gt; $additional_feature,
             ];
             if (!Feature::where('name', '=', $additional_feature)-&gt;exists()) {
                 $additional = Feature::firstOrCreate($data);
                 $additional_ids[] = $additional-&gt;id;
             }
             else{
               return redirect()-&gt;back()-&gt;withFlashMessage($additional_feature . ' exists!');
             }

          }
        }
</code></pre>