news module added

This commit is contained in:
Benjamin Takats
2023-01-20 14:55:08 +01:00
parent 02eb2babd7
commit ad3b58b19d
27 changed files with 479 additions and 32 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Http\Livewire\News;
use App\Models\LibraryItem;
use Carbon\Carbon;
use Livewire\Component;
use RalphJSmit\Laravel\SEO\Support\SEOData;
class InternArticleView extends Component
{
public LibraryItem $libraryItem;
public function render()
{
return view('livewire.news.intern-article-view')->layout('layouts.app', [
'SEOData' => new SEOData(
title: $this->libraryItem->name,
description: $this->libraryItem->excerpt ?? __('Here we post important news that is relevant for everyone.'),
author: $this->libraryItem->lecturer->name,
image: asset('img/einundzwanzig-wallpaper-benrath.png'),
published_time: Carbon::parse($this->libraryItem->created_at),
type: 'article',
)
]);
}
}