Namespace server side render
This commit is contained in:
@@ -16,8 +16,12 @@ class NameSpaceController extends Controller
|
||||
{
|
||||
if (!array_key_exists($namespace, config('karudhaas.topic_filters'))) return redirect('/namespaces');
|
||||
|
||||
return view('namespaces.show',[
|
||||
'namespace' => config("karudhaas.topic_filters.".$namespace)
|
||||
$options = config("karudhaas.topic_filters." . $namespace);
|
||||
return view('namespaces.show', [
|
||||
'options' => $options,
|
||||
'articles' => Article::with('source')->whereHas('topics', function ($q) use ($options) {
|
||||
$q->whereIn('slug', $options["keys"]);
|
||||
})->latest('published_date')->paginate(8)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user