Skip to content

Instantly share code, notes, and snippets.

@mikeritter
Created February 17, 2018 17:37
Show Gist options
  • Save mikeritter/a72f0ee5aa4c8e1a3c7c34a256d3dcbf to your computer and use it in GitHub Desktop.
Save mikeritter/a72f0ee5aa4c8e1a3c7c34a256d3dcbf to your computer and use it in GitHub Desktop.
Iterating Indexed IDs in Vue w Blade
@extends('layouts.app')
@section('content')
<div class="mb-2"><a class="btn btn-sm btn-outline-dark" href="{{ url('/') }}"><span aria-hidden="true" class="pr-2">&#60;</span>back</a></div>
<h2>Guides</h2>
<div id="guides">
<div class="card mb-4" v-for="(value, key) in content[0].guides" v-cloak :id="'guide_' + key">
<p class="card-header" :id="'guide_' + key + '_header'">@{{ value.title }}</p>
<div class="card-body" :id="'guide_' + key + '_body'">
<p v-for="page in value.pages" v-cloak>@{{ page }}</p>
</div>
</div>
</div>
@endsection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment