Laravel 5.2 PHP Build a social network - Input Validation

Поделиться
HTML-код
  • Опубликовано: 6 фев 2016
  • Build a complete Social Network Web Application with PHP Laravel. In this video we'll add some input validation to make sure that only valid forms are submitted to our controller.
    Complete source code: github.com/mschwarzmueller/la...
    Complete Laravel-course on Udemy: www.udemy.com/modern-web-deve... (Coupon: RUclips1)
    In this course we'll build a neat little social network and cover the basics of developing with Laravel.
    You can follow me on Twitter (@maxedapps), Facebook ( / academindchannel ) or visit our Website (www.academind.com).
    See you in the videos!
  • НаукаНаука

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

  • @sujeetagrahari2292
    @sujeetagrahari2292 5 лет назад

    The best thing I like that you discuss the problems that you face as tutorial goes.
    Also, You tell us what you will be doing in the next step. It's really awesome, because that way we can also use our brain and pause video to test if we can do it.
    Most other tutors just came with a plan and show you their own way and finish the tutorial, they don't give you a change to do or think.
    I think it's really awesome you tell us your plan or what you gonna do in the next step, and also WHY.

  • @deninkorjenic4727
    @deninkorjenic4727 7 лет назад +2

    I'm loving your series, spent all saturday watching it and coding along. Thanks for your efforts mate!

    • @academind
      @academind  7 лет назад

      Amazing to hear that - I'm very happy that you're liking it Denin!

    • @deninkorjenic4727
      @deninkorjenic4727 7 лет назад

      Just finished with the tut few hours ago and I can't thank you enough, learned a ton!

  • @Venessens
    @Venessens 6 лет назад +5

    If you are using Bootstrap 4 you need to add 'is-invalid' instate of 'has-error'
    Here is the right validation-form for the Sign up email.

  • @dewainewilliams1015
    @dewainewilliams1015 7 лет назад

    I really enjoy watching your tutorial so far, you make Laravel feel simple and also cover necessary details.

    • @academind
      @academind  7 лет назад

      Awesome to hear, thanks so much for your great feedback!

  • @MakoBec
    @MakoBec 7 лет назад +3

    You taught me something new where others tutorial didnt included, thanks

    • @academind
      @academind  7 лет назад +2

      That's really amazing to hear, thank you so much! :)

  • @taylorparrish7638
    @taylorparrish7638 7 лет назад

    You do an amazing job teaching laravel. Please continue. Need more tutorials like yours. Thanks so much.

    • @academind
      @academind  7 лет назад

      You're awesome feedback means a lot to me Joseph, thanks a lot! :)

  • @anthonydalechua7717
    @anthonydalechua7717 8 лет назад

    Just wanted you to know YOU"RE AWESOME! I just found your videos the past 2 days and it's more detailed and informative. I had a problem with the $errors not displaying and read the comment section and it's now working. Please post more videos! I'll enroll at your udemy course. Keep up the good work!
    P.S. Sorry for my bad english.

    • @academind
      @academind  8 лет назад

      +Anthony Dale Chua
      Anthony, thank you so much for this awesome feedback! It's people like you who really keep me going! :) I got plenty of ideas for the future and I can't wait to create a lot of new videos, video series and courses! :)

  • @theone2474
    @theone2474 7 лет назад

    This series is really helpful with my final year project, thanks!!

    • @academind
      @academind  7 лет назад

      Great to hear that! :)

  • @wahyuhendrohartono7362
    @wahyuhendrohartono7362 5 лет назад

    this is the best, no one make a very detailed tutorial like this. Thank you :)

    • @academind
      @academind  5 лет назад

      What more can I say but thanks so much for this amazing feedback Wahyu, this really means a lot to me!

  • @shadowursake
    @shadowursake 7 лет назад

    Your tutorials are great. I've learned a lot from you. Keep up the good work. Thank you.

    • @academind
      @academind  7 лет назад

      I'll try my best, thanks so much for your great feedback!

  • @SrvGamingHD
    @SrvGamingHD 7 лет назад

    hii i m new to laravel and php but dis tutorial really helping me a lot :) ur teaching style is great !! thank you very much sir for dis tutorial.

  • @burningraven06
    @burningraven06 6 лет назад +1

    Am I the only one who cracked up when you corrected yourself at 4:05 by saying '"Angular2?? !!' Laravel ships with .... " ?
    Btw, thanks a million for these awesome tutorials!

    • @academind
      @academind  6 лет назад +2

      I used to record a lot of Angular videos at that time :D
      Thank you for your comment, happy to read that you like the videos!

  • @ParthChokshi
    @ParthChokshi 8 лет назад

    You are awesome! Really like your step by step procedure to reach the goals!

    • @academind
      @academind  8 лет назад

      +Parth Chokshi
      Thank you Parth, I'm really happy to hear this! :)

  • @agilasadi5044
    @agilasadi5044 7 лет назад

    You seem to be very experienced in such topics, everything I was wondering is very well covered

    • @academind
      @academind  7 лет назад

      Great to hear that, thanks so much!

  • @saranyac6708
    @saranyac6708 7 лет назад

    sir, this is very clear and easy to understand this tutorial thanks........

  • @IrfanUllahHosain
    @IrfanUllahHosain 8 лет назад

    Thank you very much for taking time and making excellent tutorials. I am new to Laravel and learning from laracasts. I would love to see more tutorials on Laravel 5.2. Are you thinking to continue this series. once again thank you.

    • @academind
      @academind  8 лет назад

      +Irfan Ullah
      Hi, I'll continue creating Laravel tutorials. If you're interested in a complete course right now, you might also want to give my Udemy course a try: www.udemy.com/modern-web-development-with-laravel/
      Use coupon RUclips_FEB to get it for just 17$

  • @johnneumann1425
    @johnneumann1425 7 лет назад

    You're a great teacher. Thanks for this video. You got me as your subscriber.

    • @academind
      @academind  7 лет назад

      Thanks so much John! :)

  • @JayJaylus
    @JayJaylus 8 лет назад

    Your tutorials are great!. Keep up the good work. I am new to frameworks and right now am learning laravel and then symfony.....for validation i also like to add html5 validation and using input name fields like 'email' instead of text. This way users using modern browsers dont even need to submit before an error pops up.

    • @academind
      @academind  8 лет назад

      +This guy
      Hey, I'm happy you're liking my videos.
      You are absolutely right about the HTML5 validation. It's missing in the videos just because I'm only focusing on Laravel validation. In my opinion you also always should have some form of server validation since I can't be tricked - which client side validation often can be. Nonetheless using HTML5 validation is definitely a good practice, as it also helps mobile phones show the right kind of keyboard - additionally to its main function: validation ;-)
      So, very good comment!

  • @jacintoJoao
    @jacintoJoao 8 лет назад +7

    Hi guys! just to add more cool validation unless we using a list and display all errors in one, div, we can use bootstrap help block and has-error class to display errors on each input. so if someone would like to do so this the code for that.
    First Name
    @if ($errors->has('first_name'))
    {{$errors->first('first_name')}}
    @endif
    I hope it can help others.

    • @menukawarushavithana6287
      @menukawarushavithana6287 8 лет назад

      +jacinto Joao Thank mate, it works properly!

    • @hamza_nasim
      @hamza_nasim 8 лет назад

      yes btw great effort. you covered each and every aspect of building a fully functional application.

    • @AriqDaffaA
      @AriqDaffaA 8 лет назад

      but if the error is in register form, the forms in login form appear to have an error help block too, how do i change this?

    • @jacintoJoao
      @jacintoJoao 8 лет назад

      can you be more specific!
      because you mixing login form and register form

    • @AriqDaffaA
      @AriqDaffaA 8 лет назад

      nevermind, i fixed it by making a manual validator for each form, its on the validation docs

  • @Dark16Prince
    @Dark16Prince 8 лет назад

    Thanks.... I have first time implemented it very easily.

    • @academind
      @academind  8 лет назад

      That's great to hear! :)

  • @didzisstalidzans5232
    @didzisstalidzans5232 5 лет назад

    Thanks for your efforts! Great channel!

    • @academind
      @academind  5 лет назад

      So happy to read that you like the channel Didzis, thanks so much for your comment!

  • @chameera1988
    @chameera1988 7 лет назад

    Great tutorial :) thanks a lot mate!

    • @academind
      @academind  7 лет назад +1

      Happy to hear you're enjoying them Chameera! :)

  • @soultouchingsongs
    @soultouchingsongs 8 лет назад

    Thank you sooo much.. You are a great teacher..

    • @academind
      @academind  8 лет назад

      +Rajni Nair
      Really awesome to hear this, many, many thanks! :)

  • @softpdf6369
    @softpdf6369 8 лет назад

    seriously man, I love your tutorial series..Just curiosity which tool have you used to make this tutorial series?

    • @academind
      @academind  8 лет назад

      +Soft Pdf
      I'm very happy to hear this! :) I use PHPStorm which really is great (though not free) IDE for PHP development.

  • @peenoise448
    @peenoise448 6 лет назад

    "Angular 2....." "I said it again!" cracks me up. haha.

  • @haleemzahid8612
    @haleemzahid8612 8 лет назад +1

    you are the great sir umaah

    • @academind
      @academind  8 лет назад

      It's great to hear that you're liking it - thanks for your amazing feedback!

  • @agustinbarg7192
    @agustinbarg7192 7 лет назад

    Hello, I love you, thank you!

    • @academind
      @academind  7 лет назад +1

      Love you, too! ;) Happy to hear you're liking it!

  • @sajjadboodaghi9638
    @sajjadboodaghi9638 8 лет назад +1

    For who has problem with showing the same errors for both forms:
    You can also use different name for Signup and Sign In variables to avoid problem. For example signin-email and signin-password for Sign In form and signup-email and signup-password for signup. Then you just need check if $errors->has('signin-email') or $errors->has('signup-email')...

    • @academind
      @academind  8 лет назад

      Yep, many thanks for sharing this - certainly helpful to others! :)

    • @mustafawahbi
      @mustafawahbi 7 лет назад

      i wish if there is an easier solution ...

    • @AshrafulFerdousFariv
      @AshrafulFerdousFariv 7 лет назад

      Then what about the database?

    • @slipperykicks12
      @slipperykicks12 7 лет назад

      is there no other way to do this? I tried changing the names, but then the error messages that appeared were using my new names, and for some reason even though I changed the names for the validation part to, it started to not recognise anything written in the sign in form

  • @Xirismenos
    @Xirismenos 6 лет назад

    In controller you have getName, postName etc. (Laravel 4 types)
    I think that is also not required either in version 5 and after.
    Also it is not best practice to write validations in controller. In big apps someone in group or a person in a team of developers will be confused. The role of controller is not that. So what do you think?

  • @brucebetts124
    @brucebetts124 8 лет назад

    I am really learning a lot from these presentations - they are not just click and follow - it's more listen, learn and do at just the right pace. Big Canadian Thank you!
    Everything has been going well until this snag when I change the form-group class from:
    Undefined variable: error (View: C:\xampp\htdocs\cmt
    esources\views\welcome.blade.php).
    Skipping this step of form validation for now, but I am very interested in why? Thoughts?

    • @academind
      @academind  8 лет назад

      +Bruce Betts
      Hi Bruce,
      great to hear that you're enjoying the videos and learning a lot! Many thanks for this great feedback!
      It's a tiny yet important error that snuck in: It's $errors, not $error (the s at the end is important).
      Then it should work :)

    • @brucebetts124
      @brucebetts124 8 лет назад

      +Mindspace Ahhh! These weak eyes fronting a tired old brain. Thank you!

  • @peenoise448
    @peenoise448 6 лет назад +1

    I have also to add (correct me if I'm wrong)....that the current bootstrap version has some changes I think.. the has-error class is not working anymore.. you have to move the " {{ $errors->has('email') ? 'is-invalid' : '' }}" in the form-control class in the input. as you notice the has-error is now is-invalid..

  • @sujeetagrahari2292
    @sujeetagrahari2292 5 лет назад

    There is one problem. If you put wrong credentials in your signup 'email' or 'password' field, it shows up in your "Signin" form as well. One option would be changing the 'name' attribute of field, but I don't think that right. Is there any other option?

  • @bpraia
    @bpraia 8 лет назад

    Hi there, great tutorial.
    Have a problem with the old() functionality... For example, if I fill only the email field on the signup form and press submit the errors are showed related to the signup form but both email fields, in sign up and in sign in, get filled with the data entered.
    Any suggestion?
    Thanx

    • @academind
      @academind  8 лет назад

      Hi, I think the best solution simply is to split the forms into two different forms or just make sure that you use distinct form input names in both forms

    • @bpraia
      @bpraia 8 лет назад

      That was what I also thought. Thank you.

  • @verttix
    @verttix 8 лет назад

    great video.. what editor is this?

    • @academind
      @academind  8 лет назад

      Thank you! I'm using PHPStorm by Jetbrains

  • @coolshivshakti
    @coolshivshakti 8 лет назад +2

    hello sir, first thank you for the great tutorial....
    Sir, I have some issues that my Input Validation are not working properly and I have done exactly you have shown, the errors are not appearing on the division tag, input fields are not showing red coloured error type that yo have added all in 5th video.
    Please help.
    Thank you.

    • @academind
      @academind  8 лет назад +3

      I'm happy to read that you enjoy my videos :)
      Regarding your issue: Are you still using the "web" middleware in the routes.php file? You shouldn't do that anymore (see annotation in video). Try removing it, everything should work then.

    • @bpraia
      @bpraia 8 лет назад +1

      Had the same problem. Deleting the Route group middleware did fix the problem. Thanx for your reply.

    • @ahmedqayyum
      @ahmedqayyum 7 лет назад

      I was having the same problem, and solved after removing the Middleware from the Route.php. But, I can remember that you told to write the Route inside the middleware, if want to check the validation and now you have asked to remove it. Anyhow, Thanks for your help.

  • @RahulSoni11
    @RahulSoni11 7 лет назад

    I want to add Gender input too in form using Radio input .but i don't know how to validate and insert it in database , using laravel

  • @KaushikPoojari
    @KaushikPoojari 7 лет назад

    Can you please tell me how can i add a background image to my login form..I tried using Jumbotron but it doesn't seem to work..:(

  • @user-uo1bi3nx5g
    @user-uo1bi3nx5g 8 лет назад +5

    Help me, array $errors not appearing, I put all routes in the 'web' middleware group...?

    • @academind
      @academind  8 лет назад +15

      +Максим Дуров
      Hi, this is a little "issue" with the newest Laravel version. This group is no longer needed (see the overlay in the video) and using it will cause the effect you're describing. Try putting all your routes outside of this group (you may just delete the group afterwards) and then it should work.

    • @user-uo1bi3nx5g
      @user-uo1bi3nx5g 8 лет назад

      +Mindspace Thank you very much! It works really.

    • @YanisAhmed
      @YanisAhmed 8 лет назад

      +Mindspace Thanks, I have the same issue but fixed now!!

    • @academind
      @academind  8 лет назад +2

      Okay, great to hear that it's working now ! :)

    • @umairhussain6078
      @umairhussain6078 6 лет назад

      have you pass these videos?
      please help send me the welcome.blade.php file @umair.amazingspidey@gmail.com

  • @armaghanasghar2911
    @armaghanasghar2911 7 лет назад

    I have a BadMethodCallException while using validate() using v5.2.45 on Mac v10.11.6.
    I have tried the following
    1. Compare code from Github for mistakes doesn't work

  • @sanjeevkhadka4824
    @sanjeevkhadka4824 7 лет назад +1

    I have a problem.After I used Request::old('email') and so on for preserving previous input values, and I submit the Sign Up form with taken/invalid email and other fields those values are automatically inserted to Sign In form and both forms have error highlighted text fields and of course the error msgs are displayed.What is such error?Please explain it to me with possible solution.Thank you.

    • @salmaaly587
      @salmaaly587 7 лет назад

      I have the same problem, have you solved it yet?

    • @tiktokminister5177
      @tiktokminister5177 6 лет назад

      thats because input fields in signin form and signup form both has same names. change their names to name="signUpEmail" and name="signInEmail"

  • @batjargale1
    @batjargale1 8 лет назад +1

    Thank you for useful tutorial, I have a problem, doesn't show validation error message. How to show error messages?
    I checked every code and php.ini error messages. But?

    • @academind
      @academind  8 лет назад +1

      +Batjargal Enkhkbat
      Hi, might be related to a change with Laravel 5.2 You no longer need the web middleware in the routes.php file. Try to put all your routes outside of that group (you may remove the empty group thereafter).

    • @ubcap6442
      @ubcap6442 8 лет назад

      +Mindspace Thank you, Your's right. Laravel is developing quickly.
      Thank you again Wonderful code.

    • @academind
      @academind  8 лет назад

      Thank YOU!

  • @jackchan3193
    @jackchan3193 7 лет назад

    Hi, can I get the full source code. I am wondering why my $this->validate() is not function at all.

  • @michaelmedel2449
    @michaelmedel2449 8 лет назад

    Hello. I'm pretty sure that I have typed everything correctly but I'm not outputting validation errors. I'm not getting an error and I know it's checking validation because a new user isn't being created in the database. What do you think? Thanks!

    • @michaelmedel2449
      @michaelmedel2449 8 лет назад

      +Michael Medel Nevermind! FIxed! Guy below had the same problem. Thanks!!!

    • @academind
      @academind  8 лет назад

      +Michael Medel
      Great to hear that it's working now :)

    • @michaelmedel2449
      @michaelmedel2449 8 лет назад

      +Mindspace When I finish this tutorial I am def going to take your Laravel course on Udemy to help solidify all of these details. Thank you.

    • @academind
      @academind  8 лет назад

      I'm extremely happy to hear that you really seem to like it :) Thank you!

  • @luisjorgehiguerote
    @luisjorgehiguerote 7 лет назад

    im getting this error htmlentities() expects parameter 1 to be string, array given help please

  • @blu8762
    @blu8762 7 лет назад +1

    As of Laravel 5.2+ this is no longer true. The "web" middleware group is no longer required, place your routes outside of that group. this means we dont need to use midleware group anymore ?

  • @TaufikHidayat-qe7xv
    @TaufikHidayat-qe7xv 8 лет назад +2

    can someone help me please ?
    im new in php and laravel so im start to folow this very helpfull tutorial but i got a problem when im outputing the error, the error message doestn appear, im sure to follow the instruction in this video properly. sorry for my bad english
    thanks before GBU

    • @academind
      @academind  8 лет назад

      +Taufik Hidayat
      Hi, do you get any errors? If not, could you share the code of view and controller?

    • @TaufikHidayat-qe7xv
      @TaufikHidayat-qe7xv 8 лет назад

      i dont get any error, the validation is succes , when i input the same email it doest'n write in database also when i input null in the field,
      but the error doest'n appear T_T
      View
      @if(count($errors)> 0)

      @foreach($errors->all() as $error)
      {{error}}
      @endforeach

      controller
      $this->validate($request, [
      'email' => 'required|email|unique:users',
      'first_name' => 'required|max:120',
      'password' => 'required|min:4'
      ]);

    • @academind
      @academind  8 лет назад +6

      Hi, I learned, that this is due to a change in Laravel 5.2.1. The 'web' middleware is no longer needed, and using it, will apply it twice, hence breaking the app (in this regard).
      Therefore, try putting all your routes outside of that middleware and let me know if this works.

    • @TaufikHidayat-qe7xv
      @TaufikHidayat-qe7xv 8 лет назад

      +Mindspace Wow, its work now thank you for explanation sir , i really enjoy your video hope soon i can buy your tutorial sir, thanks before god bless

    • @academind
      @academind  8 лет назад +1

      Great to hear that Taufik! :)

  • @Dimitri136
    @Dimitri136 8 лет назад

    Hi, everything fine until here but with the new updates I have a couple of problems:
    - when submitting one form the validation applies to both forms or more precisely I guess that the error message doesn't make a difference between the signup email and the signin email and both forms get the "red border";
    - by using Request::old('email') and Request::old('password') it fills both forms as again it doesn't make a difference between the two forms
    is there an easy way to solve this?

    • @Dimitri136
      @Dimitri136 8 лет назад

      Small update:
      I managed to solve the first point by creating a "Validator" instance and renaming the error bag for the specific validation:
      $validator = Validator::make($request->all(), [
      'email' => 'required|email|unique:users',
      'first_name' => 'required|max:120',
      'password' => 'required|min:4'
      ]);
      if ($validator->fails()) {
      return redirect()->back()->withErrors($validator, 'signup');
      }
      Still need to manage the Request::old() issue. I need to find a way to make a distinction between the two forms.

    • @academind
      @academind  8 лет назад

      +Dimitri136
      Hi, I think the easiest way would be to pick unique name for both forms. Like prefixing the input field names with su (signup) and si (signin) for example.

    • @Dimitri136
      @Dimitri136 8 лет назад

      Mindspace Obviously, don't know why I haven't thought of that :)
      Anyway, great job and thank you for these tuts!!

    • @Dimitri136
      @Dimitri136 8 лет назад

      +Mindspace Actually I have a new issue. If I set the name attribute to 'su_email' I get an error when he tries to check with the database if this email already exists, during the validation process, as it will look for the column 'su_email' in the users table which doesn't exist as it is simply named 'email'. Any idea on how to tell to the Validator that my column is named 'email'?

    • @academind
      @academind  8 лет назад

      That's very easy, just add the column name after the table name, separated by a comma.
      Like this: 'required|email:TABLE,COLUMN'
      More info here: laravel.com/docs/5.1/validation#rule-email

  • @alshanmahroof9686
    @alshanmahroof9686 7 лет назад

    Sir i am getting always validation fails. i am new to laravel please help me. I am so eager to learn this type of stuffs

  • @shahmirjadoon1322
    @shahmirjadoon1322 8 лет назад

    Hi,
    I need some tutorials on Hashing (change/update old passwords). I haven't seen this option in your this blog tutorial .

    • @academind
      @academind  8 лет назад

      Well, hashing is included if you have a look at the user signup video => bcrypt() makes sure that the password is hashed. Password changing isn't covered, that's correct. Might be covered in some future video.

    • @shahmirjadoon1322
      @shahmirjadoon1322 8 лет назад

      +Mindspace will be waiting for that. Thanks sir

  • @Chatsnovic
    @Chatsnovic 7 лет назад

    Hi I am using bootstrap modal to display sign up and sign in form. I typed the following under a section:
    @if(count($errors) > 0)

    @foreach($errors->all() as $error)
    {{$error}}
    @endforeach

    @endif
    When I just click submit, the modal disappears and goes back to the home page. Which it should, but not displaying the errors on the modal. Can someone help me out here?

    • @meechlinus5215
      @meechlinus5215 7 лет назад

      I don't know if you're still interested in the answer but you gotta take your routes out of web group. With 5.2 all the routes are automatically included in web group if i recall it right. So go to your routes file and delete Route::group(['middleware' => ['web']], function () {} without touching actual routes, that should fix it.

  • @shefalisharma8137
    @shefalisharma8137 7 лет назад

    I wrote:
    @if (count($errors) > 0)

    @foreach($errors -> all() as $error)
    {{$errors}}
    @endforeach

    @endif
    But an error occrus: htmlspecialchars() expects parameter 1 to be string, object given (View: C:\xampp\htdocs\lar
    esources\views\welcome.blade.php)
    What to do sir?

    • @BridgeGamingOfficial
      @BridgeGamingOfficial 7 лет назад

      not sure if you worked this out, but you are using $errors ( an object) instead of $error you defined in the foreach

  • @SurajGusainRocks
    @SurajGusainRocks 8 лет назад

    Hey there. Everything was going smooth till it showed me attempt() method does not exist.. Any resolution to this problem?

    • @academind
      @academind  8 лет назад

      +Suraj Gusain
      Hm, that sounds strange. Do you have the Auth facade import at the top of the file? Could you post the complete error message (only the message, not all the code lines below it) here?

    • @SurajGusainRocks
      @SurajGusainRocks 8 лет назад

      Yes I had it. However, I had to include the Auth in kernel.php to make it work.. it was missing. Thanks for the reply. :-)

    • @academind
      @academind  8 лет назад

      Ah okay, great to hear everything's working now :)

  • @jibrilqarni
    @jibrilqarni 8 лет назад

    where code for string " The email has already been taken " or is it generated by laravel ?

    • @academind
      @academind  8 лет назад

      That's a default message output by Laravel. You can change it in the resources/lang folder

  • @ehsanilahi6746
    @ehsanilahi6746 7 лет назад

    I have created a Authentication page according to our tutorial, form validation is working but does not show any error message. how to solve that problem.

    • @academind
      @academind  7 лет назад

      No validation errors you mean? Are you redirected back in the case of invalid values? Do correct values lead to the correct submission of the form (i.e. other page being loaded)?
      Maybe some errors in your code regarding the displaying of the messags?

    • @ehsanilahi6746
      @ehsanilahi6746 7 лет назад

      yes its redirected back in case of invalid user but it doesnot show any error

    • @academind
      @academind  7 лет назад

      Then you might have some error in the view. Make sure to compare it to my code (link in video description). Maybe some tiny error leading to this area never being displayed

  • @AhsanHabib-vt2dq
    @AhsanHabib-vt2dq 8 лет назад

    I have created a Authentication page according to our tutorial, form validation is working but does not show any error message. how to solve that problem. please give some tips brother..

    • @AhsanHabib-vt2dq
      @AhsanHabib-vt2dq 8 лет назад

      if i remove the web middleware from the route group then my welcome page doses not show...

    • @academind
      @academind  7 лет назад

      Removing the web middleware is required. Are you getting an error?

    • @ehsanilahi6746
      @ehsanilahi6746 7 лет назад

      i have same problem

  • @sharifhossain9626
    @sharifhossain9626 7 лет назад

    can u plz tell me the name of IDE which u used in this project

    • @academind
      @academind  7 лет назад

      Sure, I use PHPStorm by Jetbrains :)

  • @dadekoroti
    @dadekoroti 7 лет назад

    can we use emmet in php file?

  • @peenoise448
    @peenoise448 6 лет назад

    I'm currently following the tutorial while coding it also.. I found an error also,,, for example i want to signin without inputting my credentials,, it gives an error and to the signup also(which is not good) ... I think it might be because we named them the same? like in email in signin and in sign up... Anyways, see you next episode... It might be fix there It's been a year.. LOL

  • @zar3615
    @zar3615 7 лет назад

    Can you tell me how to use inArray validation rule

    • @academind
      @academind  7 лет назад

      Here's an example: themsaid.com/laravel-5-2-23-20160305/

    • @zar3615
      @zar3615 7 лет назад

      I think that example is wrong to begin with. It gives positive result for both cases .But it shouldn't give positive result for second case.

    • @academind
      @academind  7 лет назад

      Yeah ... this is no coding forum though, I can only go that far beyond the scope of a video ;)
      I didn't test this example, it does show the usage though - which is what you wanted to know

    • @zar3615
      @zar3615 7 лет назад

      Thanks. It seems I need to code that part manually , there is just no other way.

  • @cristianbaciu8623
    @cristianbaciu8623 7 лет назад

    03:04 Angular2? I thought we did Laravel haha

    • @academind
      @academind  7 лет назад

      That happens if you're recording videos about two different topics after each other :D

  • @francisdavis6806
    @francisdavis6806 8 лет назад

    guys $errors->has('email') ? 'has->error':' ' is not responding!!!! please anyone to help??

    • @academind
      @academind  8 лет назад +2

      It should be $errors->has('email') ? 'has-error':' ' (no -> ). Does this work?

  • @andreyboichenko3737
    @andreyboichenko3737 5 лет назад

    Validation in controller, database job in controller. What about mvc? what about Single Responsibility Principle?
    People if anyone of you want to learn how to work with laravel, you need to find another place.

  • @searchbarwebs
    @searchbarwebs 7 лет назад

    How to logout?

    • @academind
      @academind  7 лет назад

      Auth::logout() => Will also be shown in this series

    • @searchbarwebs
      @searchbarwebs 7 лет назад

      Mindspace Thanks. This series is very helpful for 5.3 although the minor differences.

  • @elecktromaestimmy
    @elecktromaestimmy 8 лет назад

    Hi there great video, keep it up.
    Looking at you playlist, we are almost done with the user saspect of this app.
    I've been fallowing this tutorial and adding my own feature mainly styling wise.
    I love your step by step explanation of what you're doing to the point that i'm begging my mum for some money to buy your online tutorials.
    That being said:
    I would like the add an extra feature :
    I want to user to be able to log in with his/her username or his email
    I added the username to the database (migration) and to the welcome page
    not mush changed in the route (so i didn't add anything there)
    if tried something like this in the postSignIn function
    if(Auth::attempt($userEmailData) )
    {
    return redirect()->route('dashboard');
    }
    else if(Auth::attempt($userUsernameData) )
    {
    return redirect()->route('dashboard');
    }
    return redirect()->back();
    This doesn't seems to work
    any advies ?
    All of google code looks so complicated and i think you may have a easier solution
    Thanks in advance
    Ps no pressure answer when you can, i'll just continue with the series in the meantime

    • @academind
      @academind  8 лет назад

      +Amara Kromah
      Hi again!
      I'm using these assumptions for the solution:
      -mail is (possibly) stored in $userEmailData
      -username is (possibly) stored in $userUsernameData
      - password is stored in $password
      The database user table has the following fields:
      -username
      -email
      -password
      Solution:
      if (Auth::attempt(['username' => $userUsernameData, 'password' => $password])) {
      echo "success with username!";
      }
      elseif (Auth::attempt(['email'=> $userEmailData, 'password' => $password])) {
      echo "success with email!";
      }
      else {
      echo "fail!";
      }
      So it's important that you pass an array to Auth::attempt() where you specify the database fields as well as the passed data.
      I hope this works for you, let me know if you're still having troubles with this.

  • @bordinhongprapat382
    @bordinhongprapat382 7 лет назад

    you said Angular2 in validation section lol

    • @academind
      @academind  7 лет назад

      Yeah I know ... that's the problem if you're switching context a lot ;)

  • @hamza_nasim
    @hamza_nasim 8 лет назад

    You are saying "Angular2" at 3:05 whereas it should be laravel!!!

    • @academind
      @academind  8 лет назад

      +hamza nasim
      Happens if you're recording multiple videos directly after each other ;)

  • @namansingh5304
    @namansingh5304 7 лет назад

    He does it soo easily ,. but it take 2 hrs for us to get it right,,, not good videos , why would you make it for mac OS anyway , 76% of pcs use windows and so do I, FUCKING shit no use psent 1 day couldnt validate through this method

    • @academind
      @academind  7 лет назад

      Sorry to hear you didn't enjoy the video Naman. The steps actually are the same on Windows/ Mac - and whilst 76% of machines might use Windows, 95% of devs use Linux/ Mac

    • @namansingh5304
      @namansingh5304 7 лет назад

      welcome.blade.php
      @extends('layouts.master')
      @section('title')
      TITLE : WELCOME
      @endsection
      @section('content')
      @if(isset($errors) && count($errors) > 0)

      @foreach( $errors->all() as $error )
      {{ $error }}
      @endforeach

      @endif
      Sign In




      Sign In


      Sign UP



      Sign Up

      @endsection
      Routes.php
      UserController.php

    • @borklazer4775
      @borklazer4775 7 лет назад +1

      why are you talking like this, im using Windows and everything works fine at me,if you didn't like the video so go find a laravel tutorial on windows, don't comment like this!