From f1f0df269fe9e6a969a264444c4961d218a0677e Mon Sep 17 00:00:00 2001 From: norareidy Date: Tue, 9 Jul 2024 10:34:25 -0400 Subject: [PATCH] tech review + more info --- docs/includes/auth/AuthController.php | 2 ++ docs/includes/auth/AuthUser.php | 2 +- docs/user-authentication.txt | 24 ++++++++++++++++-------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/docs/includes/auth/AuthController.php b/docs/includes/auth/AuthController.php index 1168483c9..0607a6b77 100644 --- a/docs/includes/auth/AuthController.php +++ b/docs/includes/auth/AuthController.php @@ -1,3 +1,5 @@ +`__ in the +Laravel documentation. User Model ---------- -By default, Laravel includes an ``App\Models\User`` Eloquent model in your ``app/Models`` -directory. You can extend the ``Jenssegers\Mongodb\Auth\User`` class to configure your -``User`` model to use the Laravel Auth module, which provides multiple authentication services. +By default, Laravel generates the ``User`` Eloquent model in your ``App/Models`` +directory. To enable authentication for users stored in MongoDB, your ``User`` model +must extend the ``MongoDB\Laravel\Auth\User`` class. + To extend this class, navigate to your ``app/Models/User.php`` file and replace the -``use Illuminate\Foundation\Auth\User as Authenticatable`` use statement with the following code: +``use Illuminate\Foundation\Auth\User as Authenticatable`` use statement with the following +code: .. code-block:: php - use Jenssegers\Mongodb\Auth\User as Authenticatable; + use MongoDB\Laravel\Auth\User as Authenticatable; Ensure that your ``User`` class extends ``Authenticatable``, as shown in the following code: @@ -51,7 +59,7 @@ creating a controller, see the :ref:`laravel-auth-controller` section on this pa Example ~~~~~~~ -The following code demonstrates a ``User.php`` file that extends the ``Jenssegers\Mongodb\Auth\User`` +The following code demonstrates a ``User.php`` file that extends the ``MongoDB\Laravel\Auth\User`` class: .. literalinclude:: /includes/auth/AuthUser.php