Skip to content

Commit f1f0df2

Browse files
committed
tech review + more info
1 parent a7e7b20 commit f1f0df2

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

docs/includes/auth/AuthController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<?php
2+
13
namespace App\Http\Controllers;
24

35
use Illuminate\Http\Request;

docs/includes/auth/AuthUser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Models;
44

5-
use Jenssegers\Mongodb\Auth\User as Authenticatable;
5+
use MongoDB\Laravel\Auth\User as Authenticatable;
66

77
class User extends Authenticatable
88
{

docs/user-authentication.txt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,29 @@ User Authentication
2020
Overview
2121
--------
2222

23-
In this guide, you can learn how to use the {+odm-long+} to modify the ``User``
24-
model and configure user authentication.
23+
In this guide, you can learn how to authenticate users stored in MongoDB
24+
by using Laravel's native authentication functionality.
25+
26+
Laravel provides a native Auth module that includes authentication services,
27+
such as guards that define how users are authenticated and providers that define
28+
how users are retrieved. To learn more about these services, see `Authentication
29+
<https://laravel.com/docs/{+laravel-docs-version+}/authentication>`__ in the
30+
Laravel documentation.
2531

2632
User Model
2733
----------
2834

29-
By default, Laravel includes an ``App\Models\User`` Eloquent model in your ``app/Models``
30-
directory. You can extend the ``Jenssegers\Mongodb\Auth\User`` class to configure your
31-
``User`` model to use the Laravel Auth module, which provides multiple authentication services.
35+
By default, Laravel generates the ``User`` Eloquent model in your ``App/Models``
36+
directory. To enable authentication for users stored in MongoDB, your ``User`` model
37+
must extend the ``MongoDB\Laravel\Auth\User`` class.
38+
3239
To extend this class, navigate to your ``app/Models/User.php`` file and replace the
33-
``use Illuminate\Foundation\Auth\User as Authenticatable`` use statement with the following code:
40+
``use Illuminate\Foundation\Auth\User as Authenticatable`` use statement with the following
41+
code:
3442

3543
.. code-block:: php
3644

37-
use Jenssegers\Mongodb\Auth\User as Authenticatable;
45+
use MongoDB\Laravel\Auth\User as Authenticatable;
3846

3947
Ensure that your ``User`` class extends ``Authenticatable``, as shown in the following code:
4048

@@ -51,7 +59,7 @@ creating a controller, see the :ref:`laravel-auth-controller` section on this pa
5159
Example
5260
~~~~~~~
5361

54-
The following code demonstrates a ``User.php`` file that extends the ``Jenssegers\Mongodb\Auth\User``
62+
The following code demonstrates a ``User.php`` file that extends the ``MongoDB\Laravel\Auth\User``
5563
class:
5664

5765
.. literalinclude:: /includes/auth/AuthUser.php

0 commit comments

Comments
 (0)