Build a Simple Template Engine like Laravel Blade in 7 minutes

Поделиться
HTML-код
  • Опубликовано: 20 авг 2023
  • In this tutorial I'll talk about building a simple template engine like laravel blade. we start from scratch and improve upon it step by step.
    🎓 PHP Course Beginner to Advanced:
    www.udemy.com/course/php-begi...
    💖 Show Support:
    www.buymeacoffee.com/amirkamizi
    📧 Join Newsletter:
    amirkamizi.com/#newsletter
    👇 Follow Me On Social Media:
    Twitter: / amir_kamizi
    LinkedIn: / amir-kamizi
    👇 Checkout My website
    amirkamizi.com
    Thank you for watching.
    If you found it useful:
    ✔️ Like & Subscribe
    ✔️ Share
    If you have any suggestions, questions, or opinion, please leave a comment below. I’m looking forward to hearing from you!
    ⭐️ Contents ⭐️
    0:00 - Intro
  • НаукаНаука

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

  • @CristianKirk
    @CristianKirk 11 дней назад +2

    This is very interesting. It takes away the mistery of template engines.

    • @amirkamizichannel
      @amirkamizichannel  10 дней назад

      Thank you very much. I'm very glad you found it useful

  • @alfredoalejandromaidana4673
    @alfredoalejandromaidana4673 6 месяцев назад +2

    Hello Professor, thanks for this amazing class !! Greetings from Argentina ! I hope to see more new videos soon !!

    • @amirkamizichannel
      @amirkamizichannel  6 месяцев назад

      Hello Alfredo! Thank you very much. I'm very glad you found them useful. Definitely!

  • @NedumEze
    @NedumEze 8 месяцев назад +2

    Hi, Amir,
    Could you consider doing a couple of Videos on Static Database Class with complete CRUD static methods? It will be great if most of the methods: select, update, delete, insert, query, are chainable.

    • @amirkamizichannel
      @amirkamizichannel  8 месяцев назад

      Hi, That's a great suggestion. I will work on it. Maybe for my next video even :)

    • @NedumEze
      @NedumEze 8 месяцев назад +1

      @@amirkamizichannel
      Please, it's crucial for many of your students and certainly, me.
      I saw something like this somewhere:
      DB::table( 'tableName')->select()->where( 'column = :column', ['column' => $column]);
      DB::table('tableName')->select()->all();
      I couldn't quite understand them. Surely, you will teach it better and respond better to our needs and follow-up questions.
      Thanks Amir, for the promise to help.

    • @amirkamizichannel
      @amirkamizichannel  8 месяцев назад +1

      definitely. it's an important topic. I will cover it for sure. thank you

    • @amirkamizichannel
      @amirkamizichannel  8 месяцев назад +1

      as requested. I hope you like it
      ruclips.net/video/ih8-mBhd7Zs/видео.html

  • @truthteachers
    @truthteachers 8 месяцев назад +2

    Hi Bro, fantastic course. Only problem, I am a newbie and i do not know how create regex for switch statement. Can you help?

    • @amirkamizichannel
      @amirkamizichannel  8 месяцев назад +1

      I'm glad you liked it.thank you. for switch it depends on the view that you want to define for example for something like this:
      @switch($value)
      @case(1)
      // do something
      @break
      for @switch($value) you can use the exact regext for if and just change it to switch
      for @case(1) you can do the same as well. but make sure to replace it with the correct thing. case $1:
      and for @break you can simply use string relpace
      then you should also have a endswitch you can add default as well.
      read the document www.php.net/manual/en/control-structures.switch.php on how to use switch with endswitch it shows an example of the full code with default and cases. that can help

    • @truthteachers
      @truthteachers 8 месяцев назад +2

      @@amirkamizichannel I did it and the result is good. Only the cache shows me an error which does not stop anything. Anyway, i would not use this in production. Rather use the safe PHP native code. Better safe than sorry. I notice Laravel and Symfony Twig are messing people's understanding. .