PHP For Beginners, Ep 32 - Handle Multiple Request Methods From a Controller Action?

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

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

  • @NirajDhakal
    @NirajDhakal ปีที่แล้ว +11

    I am never getting tired of you. I can listen to this man whole day

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

    One of the best dev in youtube.

  • @farhanali-vb8id
    @farhanali-vb8id ปีที่แล้ว +1

    Thank you.

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

    Ty

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

    I have a problem with the code, everything is exactly as you have, but if currentUserId=1 everything is rendered correctly - once, but if currentUserId=25 it is rendered twice, the first time "you are not authorized to view this page" and immediately after here there is a note and there is a "delete" button. Also the menu is rendered twice.

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

    We want php oop and laravel 9 series pleaaase

  • @jordanolson11
    @jordanolson11 ปีที่แล้ว +6

    hopeless programmer here, no joke, 15 years working in the industry (mostly web dev drupal crap, mediocre languages, never really did much OOP, I miraculously got a position as a backend engineer and I can see myself draining the life force of my team members) and my label is literally a help vampire, I learned that on stack overflow. I need to step up my game and stop being a weight or detriment to my team. I just heard recently laravel has called out laravel trainings suggesting they aren't up to par, what would be up to par? How would I find a location in the midwest (utah) to have someone qualified to train with? I'll watch the full series and keep working at it, but there's a disconnect, feels like I'm out of my league, and please no metaphors, I already know my confidence is low, and I'm working on it.

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

      Can't you just keep learning? Try something hard. Try learning C, try learning those hard topics. This will have a great impact in the way you learn things. Easier things will start to be easier to learn. Don't be afraid to be stuck for weeks on a topic. Just don't stop learning. Every day, for 30min or so, learn something hard

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

    where can i see source code?

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

      Source code links on the phpforbeginners.com website, below each respective video.

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

    Enjoying this series. Thank you.
    In the condition used to check the request is a POST request you used $_GET['id'] to get the submitted note id, so I want to know if it works that way and ask if it will not cause any problems later?

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

      This was just a mistake... It should instead be $_POST['id']

    • @andromilk2634
      @andromilk2634 15 วันที่ผ่านมา

      I found the answer ! According to the PHP documentation : " Note that the array ($_GET) is not only populated for GET requests, but rather for all requests with a query string."

  • @JohnnyBigodes
    @JohnnyBigodes ปีที่แล้ว +5

    You were sending a post request to delete a note with an id, but you were using $_GET['id'] for deleting it in the query... I think here should be $_POST['id'] instead.

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

      Good catch! Will be fixed.

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

      @@jeffreyway520 Now we just have to know how the hell that worked with a $_GET var? 😅

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

      @@JohnnyBigodes I wonder the same thing :D

    • @andromilk2634
      @andromilk2634 16 วันที่ผ่านมา

      @@roelofvanleeuwen Good question. Did anyone find an answer to this? Since this entered through a POST request, you would expect the GET global varaible to be empty and for some reason, it seems to work? Strange.

    • @andromilk2634
      @andromilk2634 15 วันที่ผ่านมา +1

      @@JohnnyBigodes I found the answer ! According to the PHP documentation : " Note that the array ($_GET) is not only populated for GET requests, but rather for all requests with a query string."