Skip to content

Commit

Permalink
Merge branch '3.x' of github.com:lara-zeus/sky into 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Jul 27, 2023
2 parents c5ae736 + 61c130f commit b90e4bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
->first();

if ($post !== null) {
request()->session()->put($slug.'-'.request('password'), request('password'));
request()->session()->put($slug . '-' . request('password'), request('password'));

return redirect()->route($post->post_type, ['slug' => $post->slug]);
}
Expand All @@ -49,8 +49,8 @@
->name('passwordConfirmation');

Route::get('/', Posts::class)->name('blogs');
Route::get(SkyPlugin::get()->getUriPrefix()['post'].'/{slug}', Post::class)->name('post');
Route::get(SkyPlugin::get()->getUriPrefix()['page'].'/{slug}', Page::class)->name('page');
Route::get(SkyPlugin::get()->getUriPrefix()['post'] . '/{slug}', Post::class)->name('post');
Route::get(SkyPlugin::get()->getUriPrefix()['page'] . '/{slug}', Page::class)->name('page');
Route::get('{type}/{slug}', Tags::class)->name('tags');
});
}
2 changes: 1 addition & 1 deletion src/Http/Livewire/LibrarTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class LibrarTag extends Component

public function mount($slug)
{
$this->tag = SkyPlugin::get()->getTagModel()::findBySlug($slug,'library');
$this->tag = SkyPlugin::get()->getTagModel()::findBySlug($slug, 'library');

abort_if($this->tag === null, 404);
}
Expand Down
1 change: 1 addition & 0 deletions src/Models/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ protected function generateSlug(string $locale): string
public static function findBySlug(string $slug, string $type = null, string $locale = null): ?Model
{
$locale = $locale ?? static::getLocale();

return static::query()
->where("slug->{$locale}", $slug)
->where('type', $type)
Expand Down

0 comments on commit b90e4bf

Please sign in to comment.