Benjamin Völkl 2023-06-29 20:01:52 +02:00
parent 008d2b0318
commit 75e5ab0095
2 changed files with 9 additions and 34 deletions

View File

@ -17,36 +17,14 @@
<h1>{{$content->title}}</h1> <h1>{{$content->title}}</h1>




<p class="mt-3 mb-4">
{{-- $content->beschreibung --}}
</p>


<p><time datetime="{{$content->datum}}">Datum</time></p>


<!-- full date -->
<p>{{$content->datum}}</p>


<!-- formatted date --> <p>{{date("d.m.Y", strtotime($content->datum))}}</p>
<p>Formatted Date: {{date("d.m.Y", strtotime($content->datum))}}</p>


<!-- get only year --> <p class="mt-3 mb-4">
<p>Year: {{date("Y", strtotime($content->datum))}}</p> {!! $content->beschreibung !!}
<p>Year: {{date("y", strtotime($content->datum))}}</p> </p>

<!-- get only month -->
<p>Month: {{date("m", strtotime($content->datum))}}</p>

<!-- get only day -->
<p>Day: {{date("d", strtotime($content->datum))}}</p>

<!-- get only hour -->
<p>Hour: {{date("H", strtotime($content->datum))}}</p>

<!-- get only minutes -->
<p>Minute: {{date("i", strtotime($content->datum))}}</p>

<!-- get only seconds -->
<p>Second: {{date("s", strtotime($content->datum))}}</p>


</div> </div>
</div> </div>

View File

@ -57,11 +57,11 @@
@foreach($contents as $content) @foreach($contents as $content)
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<div class="card shadow-md mb-4 rounded-top" > <div class="card shadow-md mb-4 rounded-top" >
<img src="https://picsum.photos/300/150" class="card-img-top"> <img src="{{ $content->image() }}" class="card-img-top img-fluid">
<div class="card-body"> <div class="card-body">
<h2 class="h3">{{$content->title}}</h2> <h2 class="h5">{{$content->title}}</h2>
<span class="text-muted mb-3">{{$content->created_at}}</span> <span class="text-muted mb-3">{{date("d.m.Y", strtotime($content->created_at))}}</span>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus architecto autem beatae, delectus dignissimos dolore dolorum, eius explicabo illo illum ipsam laborum libero mollitia neque quis repellendus, suscipit veritatis voluptatem!</p> <p class="card-text">{!! $content->nachricht!!}</p>
<div class="text-end"> <div class="text-end">
<a href="{{$content->path}}" class="btn btn-primary">Mehr lesen</a> <a href="{{$content->path}}" class="btn btn-primary">Mehr lesen</a>
</div> </div>
@ -86,11 +86,8 @@
@foreach($contents as $content) @foreach($contents as $content)
<div class="col-12 col-md-6"> <div class="col-12 col-md-6">
<div class="card shadow-md mb-4 rounded-top" > <div class="card shadow-md mb-4 rounded-top" >
<img src="https://picsum.photos/300/150" class="card-img-top">
<div class="card-body"> <div class="card-body">
<h2 class="h3">{{$content->title}}</h2> <h2 class="h5">{{$content->title}}</h2>
<span class="text-muted mb-3">{{$content->created_at}}</span>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus architecto autem beatae, delectus dignissimos dolore dolorum, eius explicabo illo illum ipsam laborum libero mollitia neque quis repellendus, suscipit veritatis voluptatem!</p>
<div class="text-end"> <div class="text-end">
<a href="{{$content->path}}" class="btn btn-primary">Mehr lesen</a> <a href="{{$content->path}}" class="btn btn-primary">Mehr lesen</a>
</div> </div>