30 Days to Learn Laravel, Ep 05 - Style the Currently Active Navigation Link

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.พ. 2025
  • In this lesson, we'll learn how to apply special styling to the navigation link that matches the current page. Laravel provides a Request object that makes things like this a cinch.
    Watch Full Series on: laracasts.com/...
    Watch thousands of videos, track your progress, and participate in a massive Laravel community at Laracasts.com.
    Laracasts: laracasts.com
    Laracasts Twitter: / laracasts
    Jeffrey Way Twitter: / jeffrey_way

ความคิดเห็น • 46

  • @ravenbergdev
    @ravenbergdev 9 หลายเดือนก่อน +6

    I havent touched laravel since v7. Im amazed how powerful blade has become!

    • @vasiovasio
      @vasiovasio 6 หลายเดือนก่อน +2

      Same! These components simply feels on Another Level! Wow! 😲😊

  • @yehuuu-xl3td
    @yehuuu-xl3td 6 หลายเดือนก่อน

    This might be the best course im following so far, youre fun to listen and I do not get distracted easily listening to you. Plus you know your shit. Good job bro and thanks for giving us this quality for free!

  • @LoneTaha
    @LoneTaha 6 หลายเดือนก่อน +4

    oh my god how perfect this course is!

  • @codingedgepk
    @codingedgepk 8 หลายเดือนก่อน +1

    Hey, I watched your video super closely! It was hilarious seeing you raise your hand so high and then tapping away on the keyboard at the end of day 3. Totally cracked me up, but I loved it! And on day 5, I noticed you did it again-definitely on purpose, right? Haha, still fun and it’s great to see how interestingly you teach.

  • @Saboor-Hamedi
    @Saboor-Hamedi 10 หลายเดือนก่อน +7

    Great, I was waiting part 05 two days, please cosider a complete and advanced tutorial on udemy, I will defently buy.

  • @alexnike3531
    @alexnike3531 8 หลายเดือนก่อน

    Great series. Amazing attention to detail. Thanks!

  • @udayworldwide
    @udayworldwide 19 วันที่ผ่านมา

    06:02
    un-necessarily complicating nav-links with just 3 items, in a beginners course!
    That might have been a part of larabits or in advanced blade capabilities course

  • @kenfyfe5809
    @kenfyfe5809 5 หลายเดือนก่อน

    After some time spent not getting the desired result, it dawned on me that I was viewing the output in a skinny browser width and thus invoking the mobile menu button code. Now I realize that the changes to the currently active link have to be done in two places. To that end, it appears to be some code duplication, but for the sake of the introduction, it's understandable!

  • @SXsoft99
    @SXsoft99 9 หลายเดือนก่อน

    I prefer to use route names to generate my routes and to check for current, mostly because most of the menus i write usually have to be checked dynamically for access before rendering. But then again the means sectioning your layout into separate templates.
    But i assume using the is() method is faster when you have a simpler app.

    • @e4caspnet
      @e4caspnet 9 หลายเดือนก่อน +3

      I think we are doing baby steps.... I am sure Jeffery will get to named routes eventually.

  • @syed-s4g
    @syed-s4g 2 หลายเดือนก่อน

    Hi Jeff
    can we get Docker with lara in coming future

  • @stefanpandele4818
    @stefanpandele4818 5 หลายเดือนก่อน

    Does anybody knows how in the world he selects all the text from the caret location up to the closing html tag? and how deletes all the text between ' ' like 'some classes goes here' without selecting it? This guy is a magician!

  • @zahiruddinahmad182
    @zahiruddinahmad182 3 หลายเดือนก่อน

    Which extension you use to add cdn in file

  • @sale7680
    @sale7680 5 หลายเดือนก่อน

    Amazing

  • @asemel-khoike6154
    @asemel-khoike6154 6 หลายเดือนก่อน +3

    now if i do :active="{{ request()->is('/') }}" it is give 'syntax error, unexpected token "is('/') }}" without ":" so the last part of the video is not correct now

    • @vasiovasio
      @vasiovasio 6 หลายเดือนก่อน +1

      Yes, they changes things nonstop for reason or without it... broke stuff, problems for every little thing, considerations...
      This is the reason many people stuck with one version for 5-7 years and don't want to know for the latest mega fancy feature that is presented in version 11.7.4!

    • @_Elfaro
      @_Elfaro 3 หลายเดือนก่อน +1

      u don't need the curly brackets

    • @asemel-khoike6154
      @asemel-khoike6154 3 หลายเดือนก่อน

      @@_Elfaro what do mean this is php code can you write an example to understand you thanks :;

  • @carlosloqueando904
    @carlosloqueando904 5 หลายเดือนก่อน

    what keys in windows. toggle word in phpstorm ?

  • @sale7680
    @sale7680 5 หลายเดือนก่อน

    ❤❤❤

  • @alirimon
    @alirimon 2 หลายเดือนก่อน

    Cutest trainer ever😂

  • @e4caspnet
    @e4caspnet 9 หลายเดือนก่อน

    could I ask which theme and parser plugins you are using. I don't get the ligatures for the fat arrows and triple equals, nor the context highlighing with logic inside the double curly braces

    • @mikethetreeclimber7
      @mikethetreeclimber7 9 หลายเดือนก่อน

      Pretty sure it's a php storm thing, and not available for VS code

  • @mdsohelrana4557
    @mdsohelrana4557 5 หลายเดือนก่อน

    i can't writing "right arrow" please help me.

    • @farazmobin2776
      @farazmobin2776 5 หลายเดือนก่อน +1

      Dash + right angle

    • @mdsohelrana4557
      @mdsohelrana4557 5 หลายเดือนก่อน

      Please send me those (dash+right) picture.

    • @farazmobin2776
      @farazmobin2776 5 หลายเดือนก่อน

      @@mdsohelrana4557 -> type this on the keyboard sir

    • @rahatabir8645
      @rahatabir8645 4 หลายเดือนก่อน +1

      ->

  • @DiamondAlex-qf2ox
    @DiamondAlex-qf2ox 5 หลายเดือนก่อน +1

    please i dont understand this episode, please could you like break it down

    • @vishverma9899968908
      @vishverma9899968908 4 หลายเดือนก่อน +2

      Can you please point out what you didn't understand, I can help give some more elaborate explanation

  • @mostafiz-xyz
    @mostafiz-xyz 9 หลายเดือนก่อน

    Please create a complete course for creating complete blog website.

  • @isaacreyes4915
    @isaacreyes4915 9 หลายเดือนก่อน

    So my question is...Do I want to get my hopes up and waste time getting started only to be greeted by a paywall later?
    I went to the website and boom paywall. I don't have a job and I guess that means I can't afford to learn -_-

    • @cristhianjhlcom
      @cristhianjhlcom 9 หลายเดือนก่อน +1

      Keep learning with freebies, get a job and then pay for the premium course. Easy!

  • @anangyoga1381
    @anangyoga1381 9 หลายเดือนก่อน

    hi Jeff, or anyone here I have a question.
    when I don't add @props on the nav-link.blade.php, it's still working. so, should we ALWAYS declare @props or we can leave it?

    • @최해성-l5n
      @최해성-l5n 8 หลายเดือนก่อน

      Starting with Laravel 7, the Blade component system implicitly converts all passed properties into variables, so you can just use them.

    • @renatofrota
      @renatofrota 6 หลายเดือนก่อน

      at 6:18 Jeffrey explains that: if you do not add it to @props, it will be treated as a regular attribute and, when adding $attributes to a tag, it will be included there (what is not always desirable).

    • @anangyoga1381
      @anangyoga1381 6 หลายเดือนก่อน +1

      @@renatofrota thanks for explaining

  • @jvincent4854
    @jvincent4854 6 หลายเดือนก่อน

    Undefined variable $active, I've added @props(['active']) on the top of nav-link

    • @jvincent4854
      @jvincent4854 6 หลายเดือนก่อน +1

      I typed $active->false instead of $active=false

    • @rofiaziztaufikrahmat
      @rofiaziztaufikrahmat 6 หลายเดือนก่อน

      @@jvincent4854 try this @props(['active' => false])

    • @naajiAcademy
      @naajiAcademy 5 หลายเดือนก่อน

      @@jvincent4854 type is this : @props(['active'=>false])