Skip to content

Fix custom routes in Lazy Admin layout - #63

Merged
CrazyBoy49z merged 3 commits into
mainfrom
fix/layout-custom-routes
Sep 25, 2026
Merged

CrazyBoy49z merged 3 commits into
mainfrom
fix/layout-custom-routes

Conversation

@CrazyBoy49z

Copy link
Copy Markdown
Member

Fixes Undefined variable $routes when a host view passes custom routes to <x-lazy-layout>, including Step2Dev article editing.

Root cause:

  • layout.blade.php used $routes but did not declare it in @props;
  • Blade therefore treated a passed routes value as a normal attribute and unset the existing $routes variable during @props compilation;
  • BaseLayout also did not accept route overrides in its constructor.

Changes:

  • declare routes as a layout prop;
  • accept optional route overrides in BaseLayout;
  • merge overrides with generated defaults so partial overrides such as only show keep create/edit/destroy keys intact;
  • add regression coverage for the custom route path used by article editing.

@CrazyBoy49z
CrazyBoy49z merged commit dfa5081 into main Sep 25, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant