Re: laravel/route/php question?
| From: | Ashley Sheridan | Date: | Wed, 12 Feb 2025 14:15:02 +0000 |
| Subject: | Re: laravel/route/php question? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-328632@lists.php.net to get a copy of this message | ||
On 12/02/2025 14:07, bruce wrote:
Hi Ashley, Thanks for the reply. The @extend(layouts.app <http://layouts.app>) got me, .. didn't really catch that the layouts.app <http://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@ashleysheridan.co.uk> wrote: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.ukOn 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 afilewithin a test laravel works. the test file resources/views/layout/app.blade.phpthe line.. <a href="{{ route('properties') }}">PProperties</a>which then generates<a href="/">PProperties</a>so in some function/methodroute('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! thanksThe 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-routesAshley Sheridan Web developer and accessibility advocate https://ashleysheridan.co.ukYou 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.