diff --git a/app/Http/Livewire/App/Article/Create.php b/app/Http/Livewire/App/Article/Create.php index f0eb8a0..7f1e59f 100644 --- a/app/Http/Livewire/App/Article/Create.php +++ b/app/Http/Livewire/App/Article/Create.php @@ -2,6 +2,7 @@ namespace App\Http\Livewire\App\Article; +use Artesaos\SEOTools\Facades\SEOTools; use Livewire\Component; use Illuminate\Support\Str; @@ -14,6 +15,9 @@ class Create extends Component public function mount() { $this->article = new \App\Models\Article(); + + SEOTools::setTitle('Create new article', false); + SEOTools::setDescription('New article created here.'); } protected $rules = [ diff --git a/app/Http/Livewire/App/Article/Edit.php b/app/Http/Livewire/App/Article/Edit.php index 22a0cf5..dcb7d00 100644 --- a/app/Http/Livewire/App/Article/Edit.php +++ b/app/Http/Livewire/App/Article/Edit.php @@ -2,6 +2,7 @@ namespace App\Http\Livewire\App\Article; +use Artesaos\SEOTools\Facades\SEOTools; use Livewire\Component; use Illuminate\Support\Str; @@ -17,6 +18,9 @@ public function mount(\App\Models\Article $article) $this->article_tags = $article->tags->map(function ($tag) { return $tag->id; }); + + SEOTools::setTitle('Edit article', false); + SEOTools::setDescription('Article is being edited.'); } protected $rules = [ diff --git a/app/Http/Livewire/App/Login.php b/app/Http/Livewire/App/Login.php index 24e8d1d..22bc40e 100644 --- a/app/Http/Livewire/App/Login.php +++ b/app/Http/Livewire/App/Login.php @@ -2,6 +2,7 @@ namespace App\Http\Livewire\App; +use Artesaos\SEOTools\Facades\SEOTools; use Illuminate\Support\Facades\Auth; use Livewire\Component; @@ -17,6 +18,11 @@ class Login extends Component 'credentials.password' => ['required'], ]; + public function mount() + { + SEOTools::setTitle('Login', false); + } + public function render() { return view('livewire.app.login'); diff --git a/app/Http/Livewire/App/Register.php b/app/Http/Livewire/App/Register.php index 8c66ffd..0da4e32 100644 --- a/app/Http/Livewire/App/Register.php +++ b/app/Http/Livewire/App/Register.php @@ -2,6 +2,7 @@ namespace App\Http\Livewire\App; +use Artesaos\SEOTools\Facades\SEOTools; use Illuminate\Support\Facades\Auth; use Illuminate\Validation\Rules\Password; use Livewire\Component; @@ -34,6 +35,11 @@ protected function rules() ]; } + public function mount() + { + SEOTools::setTitle('Sign Up', false); + } + public function render() { return view('livewire.app.register'); diff --git a/app/Http/Livewire/App/Setting.php b/app/Http/Livewire/App/Setting.php index 3c996aa..7e115c4 100644 --- a/app/Http/Livewire/App/Setting.php +++ b/app/Http/Livewire/App/Setting.php @@ -2,6 +2,7 @@ namespace App\Http\Livewire\App; +use Artesaos\SEOTools\Facades\SEOTools; use Illuminate\Support\Facades\Hash; use Illuminate\Validation\Rule; use Illuminate\Validation\Rules\Password; @@ -15,6 +16,8 @@ public function mount() { $userId = auth()->user()->getAuthIdentifier(); $this->user = \App\Models\User::find($userId)->toArray(); + + SEOTools::setTitle('My setting', false); } protected function rules()