You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this brackets into my laravel app but I am stuck at a point and not sure how to configure this out.
I am fetching all the rounds against a tournament and each round has matches... I am trying to output the players name and their scores but I am not getting anything so far !!!
Here is my code of jquery and laravel... Please help me what I am missing.
`<script type="text/javascript">
var minimalData = {
teams : [ @foreach($tournament->bracket->rounds as $round) @foreach($round->matches as $match) @if($loop->last)
["{{json_encode($match->player1_name)}}", "{{json_encode($match->player2_name)}}"] @else
["{{json_encode($match->player1_name)}}", "{{json_encode($match->player2_name)}}"], @endif @Endforeach @Endforeach
],
results : [
[ @foreach($tournament->bracket->rounds as $round) @if(!$loop->last)
[ @foreach($round->matches as $match) @if(!$loop->last)
[{{$match->player1_score}}, {{$match->player2_score}}], @else
[{{$match->player1_score}}, {{$match->player2_score}}] @endif @Endforeach
], @else
[ @foreach($round->matches as $match) @if(!$loop->last)
[{{$match->player1_score}}, {{$match->player2_score}}], @else
[{{$match->player1_score}}, {{$match->player2_score}}] @endif @Endforeach
] @endif @Endforeach
]
]
}
$(function() {
$('#minimal .demo').bracket({
init: minimalData /* data to initialize the bracket with */ })
})
</script>`
This is what I am doing but in the console , I am getting " TypeError: t[e] is undefined "
This is really frustrating and I am googling from 24 hours or maybe more... But no success why this error is showing !!!
Any help would be appreciated !!!
The text was updated successfully, but these errors were encountered:
Hello Developers Community,
I am using this brackets into my laravel app but I am stuck at a point and not sure how to configure this out.
I am fetching all the rounds against a tournament and each round has matches... I am trying to output the players name and their scores but I am not getting anything so far !!!
Here is my code of jquery and laravel... Please help me what I am missing.
`<script type="text/javascript">
var minimalData = {
teams : [
@foreach($tournament->bracket->rounds as $round)
@foreach($round->matches as $match)
@if($loop->last)
["{{json_encode($match->player1_name)}}", "{{json_encode($match->player2_name)}}"]
@else
["{{json_encode($match->player1_name)}}", "{{json_encode($match->player2_name)}}"],
@endif
@Endforeach
@Endforeach
],
results : [
[
@foreach($tournament->bracket->rounds as $round)
@if(!$loop->last)
[
@foreach($round->matches as $match)
@if(!$loop->last)
[{{$match->player1_score}}, {{$match->player2_score}}],
@else
[{{$match->player1_score}}, {{$match->player2_score}}]
@endif
@Endforeach
],
@else
[
@foreach($round->matches as $match)
@if(!$loop->last)
[{{$match->player1_score}}, {{$match->player2_score}}],
@else
[{{$match->player1_score}}, {{$match->player2_score}}]
@endif
@Endforeach
]
@endif
@Endforeach
]
]
}
</script>`
This is what I am doing but in the console , I am getting " TypeError: t[e] is undefined "
This is really frustrating and I am googling from 24 hours or maybe more... But no success why this error is showing !!!
Any help would be appreciated !!!
The text was updated successfully, but these errors were encountered: