Commenter
GitHubAdmin Panel
v2
v2
  • 😍Commenter
  • Overview
    • 💡Why Commenter
    • 🗞️Articles
    • ✨Key Features
    • 🤖Technologies
  • Basics
    • 🧠Concept
    • ®️Requirements
    • 🔨Installation
    • ✈️Usage
    • 🌈Themes
  • Demo
    • 👩‍🏫Project
    • 📺Basic Demo Video
    • 📼Full Demo Video
  • Configuration
    • 📜Publish Config
    • Migrations/Tables
    • ⚖️Change Mode
    • 🔐Authorization
    • ⏲️Limit comments per user
    • 😍Reactions
    • ⛔Approval
    • 🚧Validations
    • Sorting
    • 🛠️Other Options
  • Advance
    • 🔏Security
    • 🚀Performance
    • ⚡Events
    • 🌍Localization
    • 🛟Customization
    • 🕵️Testing
  • 🛣️Roadmap
  • 💓Sponsor
Powered by GitBook
On this page
  • Option 1 (Locally, Higher priority)
  • Option 2 (Globally)
  • Secured Guest Mode (Recommended)

Was this helpful?

Edit on GitHub
  1. Configuration

Change Mode

There are three modes available.

  • Auth Mode

  • Guest Mode

  • Secured Mode

By default Guest Mode has enabled.

Option 1 (Locally, Higher priority)

Set $guestMode, true in related model. This will effect to that model only.

use Illuminate\Database\Eloquent\Model;
use LakM\Comments\Concerns\Commentable;
use LakM\Comments\Contracts\CommentableContract;

class Post extends Model implements CommentableContract
{
    use Commentable;

    $guestMode = false; // Auth mode
}

Option 2 (Globally)

You can set guest mode enabled variable true in the config file. This will globally enabled the guest mode.

// comments.php

guest_mode => [
    'enabled' => false, // Auth Mode
]

Secured Guest Mode (Recommended)

The default guest mode relies on user's IP address, which is not ideal for security. For a more secure guest mode, consider enabling the secured guest mode feature.

// comments.php

guest_mode => [
    'enabled' => true,
    'secured' => true,
]

How it works

Users are required to confirm their email address via a verification link before commenting. This system doesn't interact with the default users table or the web auth guard. Instead, it operates through a dedicated guests table and a custom guest guard. This ensures that your default authentication system remains unaffected, allowing the package to work seamlessly even on sites that already have an existing authentication setup.

PreviousMigrations/TablesNextAuthorization

Last updated 7 months ago

Was this helpful?

⚖️