Laravel 8 tutorial in Hindi - What is middleware

Поделиться
HTML-код
  • Опубликовано: 12 сен 2020
  • in this laravel 8 hindi video tutorial, how to apply validation on HTML form and show error message Laravel 8ther version. This video is made by anil Sidhu in the Hindi language
    steps of video
    What is Middleware
    Middleware Type
    Make Middleware
    Apply Middleware
    Interview Question
    Laravel 9 tutorial in Hindi

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

  • @mirijazurrahaman3371
    @mirijazurrahaman3371 3 года назад +6

    I think you forgot to include this video into your laravel playlist
    Thanx for sharing your knowledge 🙂

  • @akSingh_120
    @akSingh_120 Год назад

    Its great Sir.

  • @hemantsoni211
    @hemantsoni211 3 года назад +3

    sir whenever I visit your channel I search laravel 8 tutorial in hindi playlist on your channel playlist but every time not found this
    So, I have to search it on youtube's search bar, Please sir add this list to channel playlist so more and more student visit directly through you channel and access the series.

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

    Yes, we use middleware in controller
    Step 1: in controller you create constructor like and apply middleware :-
    public function __construct()
    {
    // Assign to ALL methods in this Controller
    $this->middleware('auth');
    // Assign only to ONE method in this Controller
    $this->middleware('auth')->only('create');
    // Assign only to specific methods in this Controller
    $this->middleware('auth')->only(['create', 'store']);
    // Assign to all EXCEPT specific methods in this Controller
    $this->middleware('auth')->except('index');
    }

  • @InspireHour
    @InspireHour 2 года назад

    A CSRF token is a secure random token (e.g., synchronizer token or challenge token) that is used to prevent CSRF attacks. The token needs to be unique per user session and should be of large random value to make it difficult to guess. A CSRF secure application assigns a unique CSRF token for every user session.

  • @TWNOGaming
    @TWNOGaming Месяц назад

    middleware kyu use kare sir ya restriction wale kam tho ham controller par bhi kar sakta hai na?

  • @raodyc
    @raodyc 3 года назад +2

    You forgot to add this video to playlist of laravel

  • @vijaysharma-fm2ol
    @vijaysharma-fm2ol Год назад

    Very good

  • @nilanjanchakraborty2694
    @nilanjanchakraborty2694 3 года назад

    Route pe middleware ko use korke hum controller ke upor apply kor sakte hai.

  • @mnuman3692
    @mnuman3692 11 месяцев назад

    Sir kindly make a video on reset password

  • @kaziovesh9798
    @kaziovesh9798 3 года назад

    sir iska javab aphi batade...
    ya to iske uper bhi ek video banadijiye
    how to use middleware in controller

  • @sharadsharma3245
    @sharadsharma3245 3 года назад

    Sir react me middleware ki video he kya muje mil nhi rhi

  • @k.ashutoshbaitharu3964
    @k.ashutoshbaitharu3964 9 месяцев назад +1

    China after watching this: mujhe kyu toda 🤣

  • @k.ashutoshbaitharu3964
    @k.ashutoshbaitharu3964 9 месяцев назад +1

    How is your code not going into infinite loop?
    As we added the checkAge middleware globally it should also check age for /noaccess route since there is no age passed to /noaccess router redirect in the middle it goes into a infinite loop in my code.
    What's the solution to it and how your code works perfectly?
    Thank you.

    • @k.ashutoshbaitharu3964
      @k.ashutoshbaitharu3964 9 месяцев назад +1

      Ok, I missed out on checking if the $request object has the age property or not on this line
      $request->age && $request->age < 18
      I was only checking if age is lesser than 18.

  • @dev6716
    @dev6716 2 года назад

    if age is =18 or > 18 then how to redirect it to desired page for example i want to move user on form page ?

    • @ravirajparmar007
      @ravirajparmar007 Год назад +1

      you can just write else part and put the file name in redirect

  • @vhoraaamir519
    @vhoraaamir519 Год назад

    When check age Zero and blank. Welcome page show any solution???

    • @yogeshwarbarai9686
      @yogeshwarbarai9686 Год назад

      you will have to handle the data using redirect or view method when age is 0 . since in video he specified only one condition of < 18

  • @sagarbehera6316
    @sagarbehera6316 Год назад

    the question you have ask please give the answer

  • @VishalYadav-gu3kz
    @VishalYadav-gu3kz 3 года назад

    agar hum sirf
    $request->age$request->age && $request->age

    • @onkarsoni
      @onkarsoni Год назад

      because you are not declaring request variable first

    • @mihirpatel6758
      @mihirpatel6758 11 месяцев назад

      I think vo infinity loop me chala ja raha hai, Vo noaccess page par bhi condition check kar raha hai.

    • @mihirpatel6758
      @mihirpatel6758 11 месяцев назад

      I think you made mistake here
      if($request->age && $request->age < 18 ){
      return redirect('noacccess');
      }
      return $next($request);

  • @raodyc
    @raodyc 3 года назад

    If it's not working for you, you need to write this way ?age=10