PHP For Beginners, Ep 31 - Namespacing: What, Why, How

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024
  • It's time to discuss PHP namespacing, but don't worry: I'm going to make this incredibly easy to understand. If you can remember the days of storing your entire music collection locally, you'll grasp namespacing in seconds. Watch this full series at phpforbeginners....
    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

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

  • @batsmanist
    @batsmanist 10 หลายเดือนก่อน +2

    No day passes without me on this channel.❤

  • @BecomeAWebDev
    @BecomeAWebDev ปีที่แล้ว +3

    You're teaching as teaching's supposed to be done. good job

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

    i realy love your teaching

  • @somegoofy
    @somegoofy ปีที่แล้ว +4

    Oki, to view error messages file indexphp in the beginning needs two rows: error_reporting(E_ALL); and ini_set('display_errors', 'on');
    Searching why after changes in video code stopped showing one note...
    Problem found .... in file functions.php is used class Response, but if we write namespace Core; in the beginning of functions.php then follows other problems
    So solution - in beginning of function.php put - use Core\Response;

  • @belalehner3937
    @belalehner3937 ปีที่แล้ว +3

    Now I know the reason why Laravel uses the same namespace names as the direcories for the files. As I take a look at the spl_autoload_register function at 09:47 it is clear, that the dir name after the string replace is identical with the namespace. Great, I didn't know that, but I have
    got it.

  • @jonasbirkelof3614
    @jonasbirkelof3614 ปีที่แล้ว +1

    Looking forward to it! 😊

  • @paulbrugger9610
    @paulbrugger9610 10 หลายเดือนก่อน +2

    At 9:45 he skips over the Core/functions.php file and does not add in use Core/Response at the top. Episode 31 repo is missing it also. So SHOWING a note does not work. You can grab this file from episode 32 and it will work.... Great series, though.

  • @badrjeddab4549
    @badrjeddab4549 ปีที่แล้ว +1

    also namespaces help to indentifie wich class that you gonna use if you have multiple classes with same name

  • @sotelio5775
    @sotelio5775 11 หลายเดือนก่อน +1

    I'm rewriting everything 😄

  • @AK2000YY
    @AK2000YY 11 วันที่ผ่านมา

    should i start 'core' file with a capital letter??

  • @RegulusVi
    @RegulusVi ปีที่แล้ว +1

    Great, thank you as always for awesome content you share for free.
    Little request: Could we please have some WYSIWYG editor on Laracasts Forums, to write our posts?
    Because, otherwise, it is hard to remember some tricks, like this: """, to place source code in a post.
    Provide us with some automatic format buttons, please.

  • @leandrobernardini
    @leandrobernardini ปีที่แล้ว

    Über useful, thank you!

  • @Фанат-щ9ь
    @Фанат-щ9ь ปีที่แล้ว +1

    Thank you for expand my knowledge.
    I heard that in America and most Europeans country php isn't popular programming language, how many projects or job offers on php can be meet in your country?
    Please sorry for my poor English.

    • @hadley8899
      @hadley8899 ปีที่แล้ว +1

      I'm in the UK and jobs for PHP here a plentiful (There are a lot of them)

    • @Фанат-щ9ь
      @Фанат-щ9ь ปีที่แล้ว

      @@hadley8899 Respect you for answering, I live in Russian and here bunch of vaccines also.

  • @webpulseify
    @webpulseify ปีที่แล้ว

    omg, its just 12 min, but it took more than one hour for me because of errors 😄but after all errors, I clearly understand concept of namespacing

  • @ekramer1
    @ekramer1 4 หลายเดือนก่อน

    Ah yes, back before all of my music was on streaming services...... Oh wait, that wasn't a time period I can remember due to being too young to even listen to my own music on a computer of my own lol.

  • @syedjackson6931
    @syedjackson6931 ปีที่แล้ว

    can you help me with control structure of laravel

  • @grantmitchell1984
    @grantmitchell1984 ปีที่แล้ว

    I still don't get it...

    • @SimionChis
      @SimionChis ปีที่แล้ว +1

      If help, it is not an easy concept to understand but it is very important. You also can look for another tutorials. A good one is th-cam.com/video/Jni9c0-NjrY/w-d-xo.html

  • @MahdiAmeri
    @MahdiAmeri ปีที่แล้ว

    Wonder why I can’t watch ads in this channel

    • @Laracastsofficial
      @Laracastsofficial  ปีที่แล้ว +9

      We don’t display ads or earn money from this channel.

    • @MahdiAmeri
      @MahdiAmeri ปีที่แล้ว +2

      @@Laracastsofficial thanks so much. Really wanted to pay tribute to your great work even by watching ads🙏