Skip to content

Commit

Permalink
Adding fixes to theme and default post
Browse files Browse the repository at this point in the history
  • Loading branch information
tnylea committed Oct 6, 2024
1 parent 1275111 commit d10e0f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 23 deletions.
19 changes: 2 additions & 17 deletions app/Models/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,11 @@

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Wave\Post as WavePost;
use Illuminate\Support\Facades\Storage;

class Post extends Model
class Post extends WavePost
{
public $guarded = [];

public function link(){
return url('/blog/' . $this->category->slug . '/' . $this->slug);
}

public function user(){
return $this->belongsTo('\Wave\User', 'author_id');
}

public function image(){
return Storage::url($this->image);
}

public function category(){
return $this->belongsTo('Wave\Category');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
?>

<x-layouts.marketing>

<x-elements.back-button
class="max-w-4xl mx-auto mt-4 md:mt-8"
text="back to the blog"
:href="route('blog')"
/>

<article id="post-{{ $post->id }}" class="max-w-4xl px-5 pb-20 mx-auto prose prose-md dark:prose-invert lg:prose-lg lg:px-0">

<x-elements.back-button
class="max-w-4xl mx-auto mt-4 md:mt-8"
text="back to the blog"
:href="route('blog')"
/>

<meta property="name" content="{{ $post->title }}">
<meta property="author" typeof="Person" content="admin">
<meta property="dateModified" content="{{ Carbon\Carbon::parse($post->updated_at)->toIso8601String() }}">
Expand Down

0 comments on commit d10e0f6

Please sign in to comment.