On 12/02/2025 14:07, bruce wrote:
Hi Ashley,
Thanks for the reply.
The
@extend(layouts.app)got me, .. didn't really catch that the layouts.app was layouts/app.blade.php....
I've got an additional question if I may.
Say I have a basic bootstrap/template, and I'm looking to create a test site, with mods.
Am I correct in assuming I can "break" the template up into pieces (blades), make mods as needed, and more or less recombine the pieces
with routes/views/extend/yield/etc as needed..
thanks
-bruce
On Wed, Feb 12, 2025 at 4:09 AM Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx> wrote:
On 11/02/2025 19:20, bruce wrote:
> Hey/Hi,
>
> I realize that this isn't a specific laravel channel, but -- here's
> the question.
>
> New to laravel, trying to track down how/where a statement in a file
> within a test laravel works.
>
> the test file
> resources/views/layout/app.blade.php
> the line..
> <a href="">PProperties</a>
>
> which then generates
> <a href="">PProperties</a>
>
> so in some function/method
> route('properties') ==> "/"
> or
> route:get "properties" gets xferred to "/"
>
> but, so far, I can't seem to track down where this might happen, or
> the flow of the logic.
>
> If anyone has any pointers, feel free to fire them to me!
>
> thanks
>
The route() helper method is used to generate a URL to a named route. In
your case, it's looking for a route called "properties". Do you have
that defined in your routes/web.php file?
More information on creating named routes can be found in the Laravel
documentation: https://laravel.com/docs/11.x/routing#named-routes
Ashley Sheridan
Web developer and accessibility advocate
https://ashleysheridan.co.uk
You can organise your blade templates however you wish. I tend to
break it up into individul components when something becomes
complex, or I need to repeat something.
I would advise you go through the Laravel documentation, as it
will help you understand how it behaves, and how all of these
things work.
Ashley Sheridan Web developer and accessibility advocate https://ashleysheridan.co.uk