The New Way to Build with AI! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Browse ReUI Pro

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.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)

Deleted comment
Deleted comment
Deleted comment
Deleted comment

Hi,

Both documentation and default page use x-base-layout defined in app/View/Components/BaseLayout.php

In that class, there is a condition. Docs and default pages use different layout files.

layout/docs/master and layout/master

Please check the class and customize it to your requirements.

Thanks



When I put

x-base-layout
/x-base-layout

with no authentification is still user the layout with authenticated page with the ASIDE blank. It is not displaying like the documentation page


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
buy metronic keenthemes mega bundle

ReUI

Open-source React components, blocks and templates built on shadcn/ui and Tailwind CSS by Keenthemes.