Skip to content

Commit

Permalink
livewire install and blog component
Browse files Browse the repository at this point in the history
  • Loading branch information
SethSharp committed Feb 3, 2024
1 parent ffb8c7f commit e7edc3a
Show file tree
Hide file tree
Showing 9 changed files with 282 additions and 1,661 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Views/Blogs/IndexBlogsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Http\Controllers\Views\Blogs;

use App\Domain\Blog\Models\Blog;
use Illuminate\View\View;
use App\Domain\Blog\Models\Blog;
use App\Http\Controllers\Controller;

class IndexBlogsController extends Controller
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Views/Blogs/ShowBlogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Http\Controllers\Views\Blogs;

use App\Domain\Blog\Models\Blog;
use Illuminate\View\View;
use App\Domain\Blog\Models\Blog;
use App\Http\Controllers\Controller;

class ShowBlogController extends Controller
Expand Down
24 changes: 24 additions & 0 deletions app/Http/Livewire/blogs/ShowBlog.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace App\Http\Livewire\blogs;

use Livewire\Component;
use App\Domain\Blog\Models\Blog;

class ShowBlog extends Component
{
public Blog $blog;

public function mount(Blog $blog)
{
$this->blog = $blog;
}

public function render()
{
return view('livewire.blogs.show-blog', [
'blog' => $this->blog
])
->layout('layouts.main');
}
}
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"laravel/framework": "^9.19",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.7",
"livewire/livewire": "^2.12",
"tightenco/ziggy": "^1.0"
},
"require-dev": {
Expand Down
Loading

0 comments on commit e7edc3a

Please sign in to comment.