Master Laravel 11: Create RESTful APIs for User Management with Sanctum | Token Based API

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

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

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

    Thank you for your clear and explanatory narration. I am looking forward to your new videos on topics like processing XML structures, passport api , Guzzle with api process, Websockets, Redis, and Elasticsearch in Laravel. Thank you a lot!

    • @programmingfields
      @programmingfields  5 หลายเดือนก่อน +2

      Thank you for your valuable feedback and suggestions. I appreciate your valuable time. I will definitely bring videos for all of these suggestions. Please keep connected 🙏🙏

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

      @@programmingfields thanks a lot

  • @ThirunavukkarasuG-i5b
    @ThirunavukkarasuG-i5b หลายเดือนก่อน +1

    Super brother keep going continue same

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

    well explained! Thanks

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

    Just subscribed now.congratulation you have got a new subscriber sirr

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

    Very clear explanation! Thank you!

  • @373323
    @373323 2 หลายเดือนก่อน +1

    awesome, i will watch this a few times, this is good stuff

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

    very helpful! thanks! can you provide some details on how to change response of validation errors?

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

      Yes, you can define an array of the validation error messages and according to the validation rules, you can set the custom validation error message.

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

    Wow nice . please can you make video on Laravel Reverb with blade.its very important and we did not find this topic with blade on TH-cam.Thank you

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

      Sure, I have noted your suggestion. I will make this very soon.

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

    Thank You

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

    If I lose my token from the browser's local storage, how can I log out myself?

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

      @@sajjadhossainshuvo6975 If you have stored token in the local storage and somehow it is removed from local storage then you will have to invalidate that API token from server side. So you can revoke the token access.
      You will have the logout API. So simply trigger that it will revoke the previous token access from the backend and it will redirect you to the login page. So that you can regenerate a fresh token.

  • @RafiulIslam-r7q
    @RafiulIslam-r7q 3 ชั่วโมงที่ผ่านมา

    You are learning and talking about Rest API but Why Your Video title RestFul APi?

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

    very nice

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

    Laravel world🔥🔥🔥

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

    I will explain my problem in production
    Can you give suggestions on that…
    When I am inserting bulk data in local for one lakh json data it will take 7 seconds but same thing I did in production 10k also taking 2 min
    I am using sanctum, cors, redis,queues and chunks for insertion

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

      There may be various factors in comparison to local and production server. You can try the below steps-
      1. Check Server Resources:
      - Ensure your production server has enough CPU, RAM, and I/O capacity.
      2. Optimize Database Config:
      - Increase buffer pool size.
      - Use connection pooling.
      - Optimize write-ahead logging.

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

      @@programmingfields Thank you

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

    Good Laravel api

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

    I think I missed something, I tried to code along and it says createToken is undefined.

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

      Did you try this line?
      // If credentials are incorrect
      if (!Auth::attempt(['email' => $request->email, 'password' => $request->password])) {
      return ResponseHelper::error(message: 'Unable to login due to invalid credentials.', statusCode: 400);
      }
      $user = Auth::user();
      // Create API Token
      $token = $user->createToken('My API Token')->plainTextToken;

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

      You can refer to 36:08

  • @abrarhasan7177
    @abrarhasan7177 2 หลายเดือนก่อน +1

    I like your video but if your language will hind then its easy to understand me.
    Can you help me?

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

      @@abrarhasan7177 That's fine, but I am not using very difficult word and sentence. That is very easy to understand. Please try learning english so it will help in your future growth.