manta-laravel-flux-cms

Installation

Installation instructions for the Manta Laravel Flux CMS package.

Requirements

The fastest way to get started is using the automated installation command:

# Install the package
composer require manta/laravel-manta-cms

# Run the complete installation
php artisan manta:install --with-migrations

What this command does:

Manual Installation

If you prefer manual control over each step:

Step 1: Install via Composer

composer require manta/laravel-manta-cms

Step 2: ServiceProvider Registration

Register the ServiceProvider in config/app.php:

'providers' => [
    // Other providers...
    Manta\FluxCMS\FluxCMSServiceProvider::class,
],

Step 3: Publishing Files

Publish the configuration, views and migrations:

# Publish only configuration
php artisan vendor:publish --provider="Manta\FluxCMS\FluxCMSServiceProvider" --tag="config"

# Publish only views
php artisan vendor:publish --provider="Manta\FluxCMS\FluxCMSServiceProvider" --tag="views"

# Publish only migrations
php artisan vendor:publish --provider="Manta\FluxCMS\FluxCMSServiceProvider" --tag="migrations"

# Or publish everything at once
php artisan vendor:publish --provider="Manta\FluxCMS\FluxCMSServiceProvider"

Step 4: Database Setup

Run the migrations to create the required tables:

php artisan migrate

Step 5: Seed Default Company

Create a default company if your database is empty:

php artisan manta:seed-company

This command will:

Default company details:

Step 6: Clear Cache

After installation, clear the cache:

php artisan view:clear
php artisan cache:clear
php artisan config:clear

Authentication Configuration

The Manta CMS package uses two separate authentication systems:

  1. Staff Authentication - For CMS administrators and staff members
  2. Account Authentication - For regular website users

Automatic Configuration

When you run php artisan manta:install, the authentication redirects are automatically configured in your bootstrap/app.php file. This ensures that:

Manual Configuration

If you need to configure authentication redirects manually, add this to your bootstrap/app.php in the withMiddleware section:

->withMiddleware(function (Middleware $middleware) {
    // Configure authentication redirects for different guards
    $middleware->redirectGuestsTo(function ($request) {
        // Check if the request is for staff routes (CMS routes)
        if ($request->is('cms/*') || $request->is('medewerkers/*') || $request->is('bedrijven/*')) {
            return route('flux-cms.staff.login');
        }
        
        // Default redirect for regular users
        return route('flux-cms.account.login');
    });
})

Available Authentication Routes

Staff Authentication Routes:

Account Authentication Routes:

Creating Staff Users

To create your first staff user for CMS access:

php artisan manta:create-staff --email=admin@example.com --password=secure-password

Or run it interactively:

php artisan manta:create-staff

Verification

You can check if the installation was successful by navigating to the following route:

/cms/dashboard

Or by running one of the available Artisan commands:

php artisan list manta