Shortcodes in your Laravel App

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • devdojo.com/ninja - Learn how to create your own Software as a Service in my Ninja Training Program.
    In this short video we'll show you how to inject code into your views using Middleware. You can create a shortcode in your view files and replace it with anything you would like using Middleware.
    This will come in handy if you release a product and don't want to dynamically change content in your views from a shortcode.

Комментарии • 9

  • @andrewhockins
    @andrewhockins 7 лет назад +1

    Why do not you use Blade with custom directives? You can simply extend them it.
    The proposed implementation is similar to a crutch.

  • @shafqatjan3396
    @shafqatjan3396 5 лет назад

    im implemented this but getting this
    Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
    Call to undefined function App\Http\Middleware\str_repace()
    laravel 5.7

  • @nuyqwerty
    @nuyqwerty 8 лет назад

    By calling $next() before return, aren't you working with the result of your NEXT middleware in THIS middleware?

    • @Devdojo
      @Devdojo  8 лет назад

      +Владислав Новик By checking that the response has the 'content' method it should move down the chain until it reaches the content, and it will modify it after all other middleware has been run :) Let me know if that helps.
      thanks.

  • @tuesdaytv
    @tuesdaytv 8 лет назад

    Hello, what sublime theme do you use? If it;s custom, would you mind sharing it?

    • @Devdojo
      @Devdojo  8 лет назад +3

      +Kyle Sheldon It's called the Material theme :) You can get it for free here: github.com/equinusocio/material-theme

  • @djlowformat
    @djlowformat 8 лет назад

    what terminal do you use?

  • @samdeacon7910
    @samdeacon7910 8 лет назад

    anymore videos coming? want mooar geek content- feed me :)

    • @TonyLea
      @TonyLea 8 лет назад

      +Sam Deacon Haha, thanks. I was planning on doing another video this weekend. Appreciate the comment. I'm definitely ramping up the videos to at least a couple a week starting next year :D