diff --git a/app/Http/Livewire/Front/Article/Show.php b/app/Http/Livewire/Front/Article/Show.php index d5dcca2..50ba5d8 100644 --- a/app/Http/Livewire/Front/Article/Show.php +++ b/app/Http/Livewire/Front/Article/Show.php @@ -2,6 +2,7 @@ namespace App\Http\Livewire\Front\Article; +use Artesaos\SEOTools\Facades\SEOTools; use Livewire\Component; class Show extends Component @@ -22,6 +23,9 @@ public function mount(\App\Models\Article $article) if (auth()->check()) { $this->user = \App\Models\User::find(auth()->user()->getAuthIdentifier())->toArray(); } + + SEOTools::setTitle("{$article->title} | Conduit X Ricardo Sawir", false); + SEOTools::setDescription($article->description); } public function render() diff --git a/app/Http/Livewire/Front/Index.php b/app/Http/Livewire/Front/Index.php index 488052d..9d6dbfa 100644 --- a/app/Http/Livewire/Front/Index.php +++ b/app/Http/Livewire/Front/Index.php @@ -2,6 +2,7 @@ namespace App\Http\Livewire\Front; +use Artesaos\SEOTools\Facades\SEOTools; use Livewire\Component; class Index extends Component @@ -12,6 +13,12 @@ public function updatedViewingPrivateFeed() { } + public function mount() + { + SEOTools::setTitle('Conduit X Ricardo Sawir', false); + SEOTools::setDescription('Real world application, implemented in Laravel Livewire'); + } + public function render() { return view('livewire.front.index', [ diff --git a/app/Http/Livewire/Front/Tag/Show.php b/app/Http/Livewire/Front/Tag/Show.php index 6e34a96..11f8d52 100644 --- a/app/Http/Livewire/Front/Tag/Show.php +++ b/app/Http/Livewire/Front/Tag/Show.php @@ -2,6 +2,7 @@ namespace App\Http\Livewire\Front\Tag; +use Artesaos\SEOTools\Facades\SEOTools; use Livewire\Component; class Show extends Component @@ -12,6 +13,9 @@ public function mount(\App\Models\Tag $tag) { $tag->load(['articles']); $this->tag = $tag; + + SEOTools::setTitle("{$tag->name} | Conduit X Ricardo Sawir", false); + SEOTools::setDescription($tag->name); } public function render() diff --git a/app/Http/Livewire/Front/User/Show.php b/app/Http/Livewire/Front/User/Show.php index 64296b7..bf4f6ff 100644 --- a/app/Http/Livewire/Front/User/Show.php +++ b/app/Http/Livewire/Front/User/Show.php @@ -6,6 +6,13 @@ class Show extends Component { + public $user; + + public function mount(\App\Models\User $user) + { + $this->user = $user->toArray(); + } + public function render() { return view('livewire.front.user.show'); diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 4564c43..4ab8dbc 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -60,7 +60,8 @@ conduit An interactive learning project from Thinkster. Code & design - licensed under MIT. + licensed under MIT. Implementation by Ricardo Sawir diff --git a/resources/views/livewire/front/index.blade.php b/resources/views/livewire/front/index.blade.php index 659d96e..96ce94f 100644 --- a/resources/views/livewire/front/index.blade.php +++ b/resources/views/livewire/front/index.blade.php @@ -3,8 +3,9 @@ diff --git a/resources/views/livewire/front/user/show.blade.php b/resources/views/livewire/front/user/show.blade.php index db86de0..abee56f 100644 --- a/resources/views/livewire/front/user/show.blade.php +++ b/resources/views/livewire/front/user/show.blade.php @@ -1,3 +1,87 @@
- {{-- Close your eyes. Count to one. That is how long forever feels. --}} +
+ + + + + +