I want to echo vuejs data inside a php function like so:
{{ auth()->user()->timesAddedBeer(@{{ beer.id }}) }}
But laravel gives me the following error:
syntax error, unexpected '{'
Can anybody tell me the right way to do this?
I want to echo vuejs data inside a php function like so:
But laravel gives me the following error:
Can anybody tell me the right way to do this? |
||||
It's not possible because the server can't access the JS value at the time executing the php script. |
|||
|
<?php
tags instead of{{
. – Andrew Oct 6 '15 at 15:38{{{ $data }}}
to echo? – senty Oct 6 '15 at 19:20<?php auth->user->()->timesAddedBeer(?> @{{ beer.id}} <?php ) ?>
– Andrew Oct 6 '15 at 20:08