Laravel 5 how to get controller display simple message box or alert?
<p>Cannot find solution to this simple problem, i just do some voting app, and if users votes I would like to show simple alert like "Thanks" , but I cannot find the way to do it from the controller? I have tried the simple jQuery code like this but it's not working.</p>

<pre><code>echo "&lt;script&gt;alert('You have already voted');&lt;/script&gt;"; 
</code></pre>

<p>Any simple solutions?</p>

<pre><code>public function voting()
{
    $ip=$_SERVER['REMOTE_ADDR'];
    $id = Input::get('msg_id');
    $vote = Input::get('vote');
    $count = Voting::wheremes_id_fk($id)-&gt;whereip_add($ip)-&gt;count();

    if($count==0)
    {
        if($vote == "up")
        {
            Project::whereid($id)-&gt;increment('up');

            Voting::insert(
                array('mes_id_fk' =&gt; $id, 'ip_add' =&gt; $ip )
            );
        }
        else if ($vote=="down") {

            Project::whereid($id)-&gt;decrement('down');

            Voting::insert(
                array('mes_id_fk' =&gt; $id, 'ip_add' =&gt; $ip )
            );
        }
    } 
    else {
        // How to popup "thanks" alert??
    }
}
</code></pre>