Laravel: Criando autenticação de usuários com Auth UI – Reiniciando

Vamos baixar as dependências no nosso projeto Laravel e depois instalar com o comando Artisan:

composer require laravel/ui
php artisan ui vue --auth

Você deverá receber um retorno semelhante ao exemplo abaixo:

A documentação do Laravel Authentication pode ser visualizada neste link.

Agora você irá perceber novas pastas e arquivos em ‘app\Http\Controllers\Auth’ e ‘resources\views\auth’.

Confira se o seu Model está como o exemplo abaixo:

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;

class User extends Authenticatable
{
    protected $table = 'users';
    use Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'password', 'language', 'last_parameter'
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];

    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'email_verified_at' => 'datetime',
    ];
}

Agora você precisa executar o NPM para que os arquivos de CSS e JS sejam carregados devidamente:

npm run dev

Ao final, uma mensagem semelhante deverá ser exibida. Ao carregar a página https://reiniciando.maksoud.dev/login a tela deverá ser como o exemplo a seguir:

Esse projeto possui todo o código disponível em https://github.com/Maksoud/reiniciando e o projeto está hospedado em https://reiniciando.maksoud.dev/. Deixe seu comentário abaixo e colabore com esse projeto.

22 comentários em “Laravel: Criando autenticação de usuários com Auth UI – Reiniciando”

  1. Spot on with this write-up, I actually feel this
    website needs a great deal more attention. I’ll probably be returning to see
    more, thanks for the information!

  2. Just desire to say your article is as amazing. The clarity
    in your post is just cool and i can assume you are an expert on this subject
    Thanks a million and please keep up the enjoyable work.

  3. Pretty section of content. I just stumbled upon your weblog and
    in accession capital to assert that I acquire actually enjoyed account your blog
    posts. Anyway I’ll be subscribing to your augment and
    even I achievement you access consistently quickly

  4. Greetings! I know this is somewhat off topic but I was wondering if you knew
    where I could locate a captcha plugin for my comment form?
    I’m using the same blog platform as yours and I’m having trouble finding
    one? Thanks a lot.!

  5. Pretty section of content. I just stumbled upon your weblog and
    in accession capital to assert that I acquire actually enjoyed account your blog
    posts. Anyway I’ll be subscribing to your augment and
    even I achievement you access consistently quickly

  6. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to
    my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time and was hoping maybe
    you would have some experience with something like this.
    Please let me know if you run into anything. I truly
    enjoy reading your blog and I look forward to your new updates.

  7. With havin so much content do you ever run into any problems of plagorism or copyright violation? My blog has
    a lot of exclusive content I’ve either written myself or outsourced but it seems a lot of it is popping it up all over the web without my agreement.

    Do you know any techniques to help protect against content from being ripped off?
    I’d definitely appreciate it.

  8. Hello, Neat post. There is a problem with your web site in web
    explorer, might test this? IE still is the marketplace chief and
    a huge portion of other people will miss your fantastic writing due to this problem.

  9. Hello there! This article couldn’t be written much better!
    Looking through this article reminds me of my previous roommate!
    He always kept preaching about this. I’ll forward this post to him.
    Pretty sure he will have a very good read. Thank you for sharing!

  10. Greetings! I know this is somewhat off topic but I was wondering if you knew
    where I could locate a captcha plugin for my comment form?
    I’m using the same blog platform as yours and I’m having trouble finding
    one? Thanks a lot!

Deixe um comentário