integration vom Blog-plugin, hübschere webseite,
This commit is contained in:
@@ -127,6 +127,34 @@ class MarketingController extends Controller
|
||||
return view('marketing.success', ['provider' => 'Stripe']);
|
||||
}
|
||||
|
||||
public function blogIndex(Request $request)
|
||||
{
|
||||
$locale = $request->get('locale', app()->getLocale());
|
||||
$posts = \Stephenjude\FilamentBlog\Models\Post::query()
|
||||
->where('is_published', true)
|
||||
->whereNotNull('published_at')
|
||||
->where('published_at', '<=', now())
|
||||
->whereJsonContains("translations->locale->title->{$locale}", true)
|
||||
->orderBy('published_at', 'desc')
|
||||
->paginate(8);
|
||||
|
||||
return view('marketing.blog', compact('posts'));
|
||||
}
|
||||
|
||||
public function blogShow($slug)
|
||||
{
|
||||
$locale = app()->getLocale();
|
||||
$post = \Stephenjude\FilamentBlog\Models\Post::query()
|
||||
->where('slug', $slug)
|
||||
->where('is_published', true)
|
||||
->whereNotNull('published_at')
|
||||
->where('published_at', '<=', now())
|
||||
->whereJsonContains("translations->locale->title->{$locale}", true)
|
||||
->firstOrFail();
|
||||
|
||||
return view('marketing.blog-show', compact('post'));
|
||||
}
|
||||
|
||||
public function paypalCheckout(Request $request, $package)
|
||||
{
|
||||
$packages = [
|
||||
|
||||
Reference in New Issue
Block a user