Installation instructions for the Manta Laravel Flux CMS package.
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:
bootstrap/app.php
If you prefer manual control over each step:
composer require manta/laravel-manta-cms
Register the ServiceProvider in config/app.php
:
'providers' => [
// Other providers...
Manta\FluxCMS\FluxCMSServiceProvider::class,
],
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"
Run the migrations to create the required tables:
php artisan migrate
Create a default company if your database is empty:
php artisan manta:seed-company
This command will:
Default company details:
After installation, clear the cache:
php artisan view:clear
php artisan cache:clear
php artisan config:clear
The Manta CMS package uses two separate authentication systems:
When you run php artisan manta:install
, the authentication redirects are automatically configured in your bootstrap/app.php
file. This ensures that:
/cms/*
, /medewerkers/*
, /bedrijven/*
) redirect unauthenticated users to the staff login pageIf 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');
});
})
/staff/login
→ flux-cms.staff.login
/staff/forgot-password
→ flux-cms.staff.forgot-password
/staff/reset-password/{token?}
→ flux-cms.staff.reset-password
/staff/logout
→ flux-cms.staff.logout
/account/login
→ flux-cms.account.login
/account/forgot-password
→ flux-cms.account.forgot-password
/account/reset-password/{token?}
→ flux-cms.account.reset-password
/account/logout
→ flux-cms.account.logout
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
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