Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @foreach($cards as $card)
- <div class="col-4">
- <div class="card x-auto @if($card->background) card-w-bg @endif">
- {{ $card->title }}
- {{ $card->description }}
- </div>
- </div>
- @endforeach
- <div class="@if($loop->even) card-w-bg @endif">
- @php
- $data = [
- [
- 'title' => 'title',
- 'img' => 'img.png',
- 'text' => 'some description',
- 'is_background' => true
- ],
- [
- 'title' => 'title',
- 'img' => 'img.png',
- 'text' => 'some description',
- 'is_background' => false
- ]
- ];
- @endphp
- @foreach($data as $datum)
- <div class="col-4">
- <div class="card mx-auto {{!empty($datum['is_background']) ? 'card-w-bg' : ''}}">
- <img class="card-img-top mx-auto" src="{{$datum['img']}}" alt="">
- <div class="card-body">
- <h5 class="card-title">{{$datum['title']}}</h5>
- <p class="card-text">{{$datum['text']}}</p>
- <h3></h3>
- </div>
- </div>
- </div>
- @endforeach
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement