Help with layouts
Hello,
I'm using the Laravel demo7,
I want to use the same layout as for documentation for the public space of my project but I cannot figure how to do that.
I know this piece of the web.php is disabling the auth but when I try on different folder inside views it does not work
$menu = theme()->getMenu();
array_walk($menu, function ($val) {
if (isset($val["path"])) {
$route = Route::get($val["path"], [PagesController::class, "index"]);
// Exclude documentation from auth middleware
if (!Str::contains($val["path"], "documentation")) {
$route->middleware("auth");
}
// Custom page demo for 500 server error
if (Str::contains($val["path"], "error-500")) {
Route::get($val["path"], function () {
abort(500, "Something went wrong! Please try again later.");
});
}
}
}); How can I achieve that? Or just change the name of documentation.
Replies (3)
Deleted comment
This article was written by a real thinking writer. I agree many of the with the solid points made by the writer. I’ll be back.follow ig