mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-07 10:40:48 +01:00
- Added a new file `PostsController.php` in the `app/Http/Controllers` directory.
- Implemented the `index()` method to retrieve all posts using the Sheets facade.
- Implemented the `show()` method to display a single post using route model binding with Sheets.
- Updated the `RouteServiceProvider.php` file to bind the 'post' route parameter to retrieve posts from the Sheets collection.
- Created a new configuration file `sheets.php` in the `config` directory, defining default settings for collections and their corresponding sheet classes, path parsers, content parsers, and extensions.
- Added a new markdown file `hello-world.md` in the `content/posts` directory as an example post.
- Created two new blade view files: `index.blade.php` and `show.blade.php`, under the `resources/views/posts` directory, for displaying lists of posts and individual post details respectively.
- Modified the existing web routes (`web.php`) to include routes for accessing posts.
The changes enable users to view all posts on `/posts`, as well as access individual post details at `/post/{post}`.
21 lines
798 B
PHP
21 lines
798 B
PHP
@extends('layouts.app')
|
|
|
|
@section('title', 'Heimerdinger.LoL • Posts')
|
|
@section('description', 'Explore all champion skins on Heimerdinger.LoL. Find detailed information on popular skins
|
|
such as Dark Cosmic Jhin, HEARTSTEEL Ezreal, PROJECT: Vayne and more!')
|
|
|
|
@section('content')
|
|
<section class="max-w-screen-xl mx-auto mt-12">
|
|
<h1
|
|
class="text-3xl font-bold text-center text-transparent uppercase sm:text-4xl
|
|
bg-gradient-to-bl from-orange-300 to-orange-500 bg-clip-text">
|
|
Posts</h1>
|
|
<h2 class="text-center text-orange-400 text-sm uppercase font-medium">Latest posts about League of Legends</h2>
|
|
@foreach($posts as $post)
|
|
{{ $post->title }}
|
|
{{ $post->description}}
|
|
|
|
@endforeach
|
|
</section>
|
|
@endsection
|