diff --git a/resources/views/posts/index.blade.php b/resources/views/posts/index.blade.php index 0aa20d0..c1d9671 100644 --- a/resources/views/posts/index.blade.php +++ b/resources/views/posts/index.blade.php @@ -14,8 +14,8 @@ @markdown($post->body) -
- +
+ Created: {{ $post->created_at }} @if ($post->created_at->diffInSeconds($post->updated_at) > 1) | Last updated: {{ $post->updated_at }} @@ -23,7 +23,7 @@ @can('delete', $post) - +
@method('delete') @csrf @@ -36,9 +36,13 @@ @auth @if (Auth::admin() && Auth::id() !== $user->id) - -
- Be careful! You have permissions to delete all blog posts, so keep that in mind before clicking on buttons. +
+ +
+ + Warning! This blog post belongs to {{ $user->name }}. +
+
@endif @endauth diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index e1dcf1a..c07eb29 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -4,7 +4,26 @@

Welcome to the {{ env('APP_NAME', 'Hovedprosjekt') }} homepage!

- GASP + +
+ +
+
+ +

Check out our users and their blog posts!

+
+ @foreach (App\User::all() as $user) + @if ($user->posts->isEmpty()) + @continue + @endif + + + @endforeach
@endsection