Laravel 6 Beginner - e8 - Form Validation

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

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

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

    Best Laravel instructor on the planet....

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

    man you deserve million of subscribers and likes.

  • @binodthakur6113
    @binodthakur6113 4 ปีที่แล้ว

    I know laravel tittle but this man enhance my knowledge on laravel. So much love from India. Thanks a lot. May god bless you and your bring more nice ideas and project.

  • @scientist.entity6609
    @scientist.entity6609 5 ปีที่แล้ว +8

    thank you a lot for your videos on Laravel, im french and i can tell u it's ez to understand with you

  • @daleryanaldover6545
    @daleryanaldover6545 4 ปีที่แล้ว

    I worked with Rails applications and the way you follow convention is pretty solid man, great series so far on Laravel!

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

    i can not freaking believe it. SO GOOD EXPLANATIONS!

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

    Amazing tutorial. You make me have good experience in Laravel. Thanks! 😍

  • @blendersky9977
    @blendersky9977 4 ปีที่แล้ว

    what a playlist am actually watching it like netflix series...thankyou bro

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

    Thanks for the smooth explanation

  • @viduvick
    @viduvick 4 ปีที่แล้ว

    This is the most didactic tutorial i've ever seen! congrats and thanks!

  • @milos5247
    @milos5247 4 ปีที่แล้ว

    Great playlist if you want to learn MVC in general.

  • @maheshlowe907
    @maheshlowe907 3 ปีที่แล้ว

    Highly recommended video series. BTW what are the formaters used to php, blade, html formatting?

  • @jayantrawat5961
    @jayantrawat5961 5 ปีที่แล้ว

    This organizing folder stuff made my coding life much easier :)

    • @CodersTape
      @CodersTape  5 ปีที่แล้ว

      it's a no brainer, you just do it and it works.

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

      @@CodersTape yeah!! haven't heard from anyone about this. This is the first time I starting work on any MVC. I am glad that I found your channel.

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

    That was amazing tutorial. Learnt new things.

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

    You can do FormRequest for the validation, it's better (for me and more clean).

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

      I agree with you in that adding that abstraction is nice on larger forms, however, it's not as straight forward to understand to a newcomer to Laravel. Better to keep it simple until ABSOLUTELY necessary.

    • @Aecy
      @Aecy 5 ปีที่แล้ว

      @@CodersTape Of course, you're right but I did not say it was the best solution for beginners :)

  • @mosesegboh
    @mosesegboh 3 ปีที่แล้ว

    Hello, great tutorial, please how can i stop the form from deleting user input during validation??

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

    love the way you explain

  • @arj7596
    @arj7596 4 ปีที่แล้ว

    Good explanation

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

    As always great tutorial very very helpfull

  • @ProgrammingwithPeter
    @ProgrammingwithPeter 5 ปีที่แล้ว

    You didn't talk about custom requests...which is a feature of laravel and it is recommended since you can extract that logic outside of the controller

  • @elx5841
    @elx5841 4 ปีที่แล้ว

    Thank you for your helpful videos. I have one question regarding the shortened version of the create: method you invoked through the Service Model:
    $data = request()->validate(['name'=>'required|min:5:max:10']);
    \App\Service:create($data);
    What if I have a variable that I need to insert into the database that will not be coming from the POST?
    EG:
    $data = request()->validate(['name'=>'required|min:5:max:10']);
    $data['value'] = 'THIS IS A STATIC VALUE';
    \App\Service:create($data);
    How do I achieve this?

  • @nomankhan-st2dp
    @nomankhan-st2dp 4 ปีที่แล้ว

    you are the best

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

    @csrf was never mentioned in any Laravel tutorials I watched so far.

  • @adam192021
    @adam192021 5 ปีที่แล้ว

    The BEST as always!

  • @codehunter1366
    @codehunter1366 4 ปีที่แล้ว

    Wow. thank you for sharing its a big help.

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

    Sir!! Can you make a video on send email to another using webmail with smtp configuration

    • @linguapharm
      @linguapharm 5 ปีที่แล้ว

      th-cam.com/video/iQoRh_9LkjU/w-d-xo.html

  • @younesmarouf2200
    @younesmarouf2200 4 ปีที่แล้ว

    Hey i'm a beginner i'm watching your videos and i like them
    i just have a question how to prevent multiple submitting in one button
    ex : when i click add customer twice all information duplicate in my db
    and again thank you for your tutorial

  • @randomguy5922
    @randomguy5922 4 ปีที่แล้ว

    i am using maatwebsite excel package, is there a way to import data and check validation on some specific fields, if any record fails to match validation, record the whole rows in a report excel file with the error message or red color in that field text which are not proper (the reason why validation failed) and then finally after full import have and option to download error excel file. So that we can correct the fields and upload that file again.Do you have any tutorial like this.
    I will be highly thankful if you guide me how to do this, i have tried to read the maatwebsite excel package documentation, but it is not very much clear to me.

  • @sezohessen7485
    @sezohessen7485 4 ปีที่แล้ว

    Note: if there is any error doesn't logic use command
    php artisan optimize

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

    does laravel validation only work with eloquent models?

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

      Request validation has nothing to do with eloquent. It just validates the request, not the model.

    • @CodersTape
      @CodersTape  5 ปีที่แล้ว

      Request validation has nothing to do with eloquent. It just validates the request, not the model.

  • @kapa4208
    @kapa4208 5 ปีที่แล้ว

    Can you please explain to me a bit about namespace, what's the difference between "\App\Model\" and "App\Model"? I saw Jeffrey uses "App\Model" in the Laracasts tutorial. So I'm not sure which convention to use.

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

      The difference has to do with the current file that you’re in. What I mean by that is that if you’re in a file that has the namespace App already. Here’s what would happen.
      \App\Model would stay as \App\Model but App\Model would tag on to the already existing namespace and give you \App\App\Model which is not what you want.

    • @kapa4208
      @kapa4208 5 ปีที่แล้ว

      @@CodersTape Ahh I see. Thanks for the answer, I'll stick with the \App\... convention.

  • @AmeerulIslam
    @AmeerulIslam 4 ปีที่แล้ว

    I think you should have said that this line: "protected $fillable" and "protected $guarded" are default properties in class Model and we are overriding it. Isn't that's what we're doing here?

  • @nataliapalweski2072
    @nataliapalweski2072 4 ปีที่แล้ว

    on showing error why form input field is reset to empty? according to Laravel documentation it is saying "Laravel allows you to keep input from one request during the next request. This feature is particularly useful for re-populating forms after detecting validation errors. However, if you are using Laravel's included validation features, it is unlikely you will need to manually use these methods, as some of Laravel's built-in validation facilities will call them automatically."
    I don't wanna use old() method

  • @hiteshaloney
    @hiteshaloney 5 ปีที่แล้ว

    How to work with ajax calls and dynamic forms in laravel ?

  • @mdfayaz3341
    @mdfayaz3341 5 ปีที่แล้ว

    I only subscribe who, i think are best,
    I've subscribed you

  • @ShahinShateri
    @ShahinShateri 4 ปีที่แล้ว

    what if we want the text field's name to be "serviceName" but the validation error message shows "The service field is required."? how can we do that?

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

    But request validation will be better way ;)

  • @vigilantezack
    @vigilantezack 4 ปีที่แล้ว

    I'm not sure I understand the mass field creation protection thing.
    If the fields were not in the submitted form, or fields don't exists in the DB, what's the problem?

    • @CodersTape
      @CodersTape  4 ปีที่แล้ว

      data injection is the short answer. long answer let's imagine an example where you have a field in the user's table to determine their subscription level. If a user was able to figure that out, they could pass in their arbitrary fields into your database by modifying the form in their browser.

    • @vigilantezack
      @vigilantezack 4 ปีที่แล้ว

      @@CodersTape yep I can see that. But there must be cases where updating a field like that would be proper. So then I assume you can bypass that setting and updated it just the same? Like when a user first signs up you'll probably set that field for the first time.

  • @silvijabojkovski5053
    @silvijabojkovski5053 3 ปีที่แล้ว

    It says that $message is not defined.... What should I do? I use version 5.4.36

  • @zombiesbyte331
    @zombiesbyte331 4 ปีที่แล้ว

    I've never understood the csrf token thing. Wouldn't you just gab the value before sending over a form submission from an external site? It only protects if you don't grab that freely and readily available token. i.e. coderstape.com login form has this token ciIWBQoEmDqP30fHTVvdvK6lIg7advnSKgzQtior, now I'd be able to submit a form using this token. I'd need to grab the next token generated to do it again but my point is; how does this stop or hinder anything, a script would quite easily grab these tokens for me on each round of cross-site submissions?

  • @romimaximus
    @romimaximus 4 ปีที่แล้ว

    hmm.. after i did add the new dedicated controller, laravel couldnt find my layout, views and nothing else and gave a big error "ReflectionException" and "Kernel does not exist'"...i couldnt fix it ..and i had to remake my whole code again....its frustating..!!! i dont know what happen...!! lol..

  • @caterpilar
    @caterpilar 4 ปีที่แล้ว

    Don't forget to turn off fields of created_at and updated_at, if you don't need them in table. To do that in your model write
    class Cl_name extends Model
    {
    public $timestamps = false;
    }

    • @nac9880
      @nac9880 4 ปีที่แล้ว

      and remove $table->timestamps() from migration to prevent the creation of these fields in first place

  • @itsumarejaz
    @itsumarejaz 4 ปีที่แล้ว

    Is there any naming convention for Controllers? In freeCodeGram Project, controller names were ProfilesController, PostsController, as there can be many profiles and posts. Similarly, services can be many, so shouldn't ServiceController be named ServicesController?

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

      There was a change in Laravel convention into singular controller names so I made the change as well. Up to you, just pick one and stay consistent with that

    • @itsumarejaz
      @itsumarejaz 4 ปีที่แล้ว

      @@CodersTape Sure

  • @alfredocarreon4449
    @alfredocarreon4449 4 ปีที่แล้ว

    how to customize a validation error message?
    ex: a name that needs to have a minimum length of 30 (rule would be min:30)
    instead of "The name must be at least 30 characters.",
    i want it to be "Name length too short. (Minimum of 30 characters)."

    • @marcinb8038
      @marcinb8038 4 ปีที่แล้ว

      you have to edit validation.php in resources/lang/en as it is stated in documentation

  • @sunwavesonmars7588
    @sunwavesonmars7588 3 ปีที่แล้ว

    i can create but cant update it , weird

  • @Alphabet_-_
    @Alphabet_-_ 5 ปีที่แล้ว

  • @sangeetha1421
    @sangeetha1421 5 ปีที่แล้ว

    Source code please

    • @CodersTape
      @CodersTape  5 ปีที่แล้ว

      I’ll get it posted up on Github under the Coder’s Tape repo.

  • @blakebrady3586
    @blakebrady3586 2 ปีที่แล้ว

    I want to buy this tool, because I want to scam bank email,