Laravel 5.8 Tutorial From Scratch - e21 - Artisan Authentication - Register, Login & Password Reset

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ก.ย. 2024
  • It's time for us to talk about registering users, login in users and resetting passwords. Up until now, a very daunting task, but with Laravel, it's as simple as running php artisan make auth and everything just works. Let's working on adding authentication to our Laravel application.
    For the best experience, follow along in our interactive school at www.coderstape...
    Resources
    Course Source Code
    github.com/cod...
    Hit us up on Twitter with any questions or comments @codertape ( / coderstape )
    About This Course
    Ready to get started on your path to Laravel Artisan? In this series, we are breaking down all of the basics of Laravel to get you comfortable using the world's most popular PHP framework. Let's get started!

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

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

    if you use laravel 6 make:auth not defined
    you should run this command => composer require laravel/ui
    then
    run command => php artisan ui:auth
    please pin this comment to help anyone listening to this video

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

      using 6

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

      @@mr_amlab366
      What do you mean?

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

      Thanks for the heads up! Following your instructions, it all seems to work except for two items:
      1: It does not bring the two lines of code for Bootstrap CDN and Script which I copied manually.
      2: Once logged in I cannot logout as the right hand side drop down does not work, however I will work on this and let you know when I have a solution.
      Regards Mac

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

      @@macmccarthy6609 because the command he use is the same command in this video, which is supposed to older laravel version for laravel 6 is
      $ composer require laravel/ui --dev
      $ php artisan ui vue
      $ php artisan ui vue --auth
      take a look laravel.com/docs/6.x/frontend#introduction

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

      up

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

    Yesss this is the magic of the ✨make:auth ✨
    Cheers

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

      i wish he didn't use that, because I want to know more about how laravel handle authentication FROM SCRATCH, as the title says

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

    Great series so far! I ran into a small problem with make:auth being missing. I was unknowingly using Laravel 6. I changed "laravel/framework": "^6.0" in composer.json to "laravel/framework": "^5.8.0" and ran `composer update` which downgraded laravel to 5.8 and seems to be working now.

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

    Thank you very much for this high-quality tutorial @coder's tape .. it helps me a lot. Guys, please support them by donating or at least please view the ads from start till end.

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

      Thank you for the support.

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

      @@CodersTape no problem.. Please keep teaching dont't stop...

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

    why are u appearing now??? where were you???. I had hell of time going through all documentation . Thank you Thank you. Thank you . Thank you!!!!!! my life savior.

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

      I’ve been traveling for work.

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

    That's Awesome!

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

    For someone who is using laravel ^6
    $ composer require laravel/ui --dev
    $ php artisan ui vue
    $ php artisan ui vue --auth
    $ npm install
    $ npm run dev

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

    best tutorial

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

    Excellent tutorial on Laravel. Can you please tell me the name of the theme you are using? Thank you.

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

      Material Theme Dark

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

    Hi.I tried to provide a multi table auth but it still depends on default guard in the auth.php . Where am I wrong? In the logincontroller i have two func for each table and use auth::attempt for checking.

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

    @Coder's Tape please help, when i put wrong credentials it will not log me in it will stay on the login page but with no error.... also when i put correct credentials it does not log me in unless i click remember me. Help please

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

    the design is not working

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

    I'm using laravel 8.
    and php artisan make:auth doesnt work anymore.
    other comments has the answer to this, but even by doing so.. the css and js is not found when you search in console.
    I did manage to make the bootstrap work though.
    By moving the CDN from layout.blade.php to layouts/app.blade.php
    anyone know why the css/app.css and js/app.js is not working?

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

    Thx bro

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

    At 3:35, whenever I try to click 'New User', the dropdown won't engage. Absolutely nothing happens. I can't log out. Please help.
    PS. When I opened 'app.css' under the 'public' directory, it was completely empty. I had to go to your source code and copy all of that into my 'app.css' file. And, a LOT of code was missing from 'app.js'; almost 30,000 lines of it. Just thought you should know.

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

      Check out the lesson on the setting up the front end.

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

    Is it possible to connect make: auth to an existing database with its user table?

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

      Certainly. You can choose which table name to use. laravel.com/docs/5.8/authentication#adding-custom-user-providers

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

    my layout stopped working, I changed them all to the layouts.app but I still have 0 layout on the pages? not sure where the error could be? I did do a downgrade from laravel 6.0 to 5.8, not sure if that could or would affect the layouts

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

      I would start with double-checking the spelling of @extends() and @section() etc... Check out the Github source code for a reference. I doubt that downgrading would have caused any issues as there are no upgrades to that part of the framework, that I know of.

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

      @@CodersTape I even copied and pasted your code from the github and the layout still isn't there

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

      @@nanchitacr try running composer dump-autoload in the terminal

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

      @@CodersTape I tried it and still nothing, I also tried view:clear and view:cache

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

      @@nanchitacr Please upload your project to Github and let me take a look.

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

    please i m getting Command "make:auth" is not defined.

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

      Couple of things to check. First, make sure you’re in the correct project directory and type in
      php artisan just to make sure that it’s working. Then try the full command.

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

      @@CodersTape thanks i tried these before but still had the error.
      i solved it by changing my lavarel/framework: '5.9.*' TO lavarel/framework: '5.8.*' in my composer.lock and i updated my composer.

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

    I have a problem on wrong authentication login where user when login to wrong access does not showing error message but redirect to another url. Can help me for this issue ?

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

      I’m assuming that you mean when a user doesn’t enter the correct email and password they redirected to the wrong place? There’s a couple of auth controllers and they have a variable $redirectTo. Change that to wherever they should be redirected to.

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

      ​ @@CodersTape Sorry your answer is not right! I mean, when I try to log in with a wrong username or password, does not show my error notice but auto redirect to another URL.

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

      Do you see Auth::routes() in your routes/web.php file?

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

      @@CodersTape please i m getting Command "make:auth" is not defined.

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

      @@overlordmarvel12 go to composer.json change "laravel/framework": "5.9.*", to "5.8.*"
      Then run composer update

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

    Eu tenho erro in user.php in register: funções public_function () {return $ this-> belongsToMany (relacionado: 'App \ Role'); }} eu tenho C: \ xampp \ laravel \ ...

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

    i need a more in-depth explanation regarding this authentication process. your tutorial just covers how to use a pre-defined feature, basically, you just tell us the "quick way" to get started. you cannot call this from scratch, I'm a bit disappointed

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

    the voice is from freecodecamp

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

      That’s right!

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

    The BEST as always!

  • @TanvirAhmed-ee4zm
    @TanvirAhmed-ee4zm 4 ปีที่แล้ว

    100% fix this way in laravel 6 or 7-
    run commands in this way-
    1. composer require laravel/ui
    2. php artisan ui:auth
    3. php artisan ui vue
    4. php artisan ui vue --auth
    5. npm install
    6. npm run dev
    you may face error while running- *npm run dev* . I was facing. In this case-
    1. npm uninstall --save-dev sass-loader
    2. npm install --save-dev sass-loader@7.1.0
    then run again- *npm run dev* .
    after generating login and register pages if you click login and register button and face error for a variable name *HOME* then add this in *App\Providers\RouteServiceProvider.php* file-
    *public const HOME = '/home';*

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

    Make a user permission video

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

    Hello sir I am working in Marriage.com project through 5.8 version may you guide please