PagibleAI CMS is a powerful package designed to seamlessly integrate comprehensive and unique content management features into any Laravel application. It adds efficient content creation, organization, and delivery to your existing app. Best of all, the installation process is remarkably simple and can be completed in under 5 minutes, allowing you to quickly unlock the potential of AI-driven content management within your Laravel environment.
How to Install PagibleAI
You need a working Laravel installation. If you don't have one, you can create it using:
composer create-project laravel/laravel pagible
cd pagible
The application will be available in the ./pagible directory.
Then, run this command within the directory of your Laravel application:
composer req aimeos/pagible
php artisan cms:install
php artisan migrate
Now, adapt the .env file of your application and change the APP_URL setting to your domain. If you are using php artisan serve for testing, add the port of the internal web server (APP_URL=http://localhost:8000). Otherwise, the uploading files will fail because they wouldn't be loaded!
Add a line in the "post-update-cmd" section of your composer.json file to update the admin backend files after each update:
"post-update-cmd": [
"@php artisan vendor:publish --force --tag=admin",
"@php artisan vendor:publish --tag=public",
"@php artisan migrate",
...
],
Authorization
To allow existing users to edit CMS content or to create a new users if they don't exist yet, you can use the cms:user command (replace the e-mail address by the users one):
php artisan cms:user editor@example.com
To disallow users to edit CMS content, use:
php artisan cms:user --disable editor@example.com
The CMS admin backend is available at (replace "mydomain.tld" with your own one):
http://mydomain.tld/cmsadmin
Configuration
Captcha protection
To protect forms like the contact form against misuse and spam, you can add the HCaptcha service. Sign up at their web site and create an account.
In the HCaptcha dashboard, go to the Sites
page and add an entry for your web site. When you click on the newly generated entry,
the sitekey is shown on top. Add this to your .env file as:
HCAPTCHA_SITEKEY="..."
In the account settings, you will
find the secret that is required too in your .env file as:
HCAPTCHA_SECRET="..."
DeepL translation
For enabling translation of content to the supported languages by DeepL, create an account at the DeepL web site first.
In the DeepL dashboard, go to API Keys & Limits
and create a new API key. Copy the key and add it to your .env file as:
DEEPL_API_KEY="..."
If you signed up for a PRO account, also set the DeepL API URL to:
DEEPL_API_URL="https://api.deepl.com/"
AI support
To generate texts/images from prompts, analyze image/video/audio content, or execute actions based on your prompts, you have to configure one or more of the AI service providers supported by the Prism package.
All service providers require to sign-up and create an account first. They will provide
an API key which you need to add to your .env file as shown in the
Prism configuration file, e.g.:
OPENAI_API_KEY="..."
GEMINI_API_KEY="..."
Note: You only need to configure API keys for the AI service providers you are using, not for all!
For best support and all features, you need Google and OpenAI at the moment. They are also configured
by default. If you want to use a different provider or model, you need to configure them in your .env
file too:
CMS_AI_TEXT="gemini"
CMS_AI_TEXT_MODEL="gemini-2.0-flash"
CMS_AI_IMAGE="openai"
CMS_AI_IMAGE_MODEL="dall-e-3"
CMS_AI_AUDIO="openai"
CMS_AI_AUDIO_MODEL="whisper-1"
Publishing
For scheduled publishing, you need to add this line to the routes/console.php class:
\Illuminate\Support\Facades\Schedule::command('cms:publish')->daily();
Clean up
To clean up soft-deleted pages, elements and files regularly, add these lines to the routes/console.php class:
\Illuminate\Support\Facades\Schedule::command('model:prune', [
'--model' => [
\Aimeos\Cms\Models\Page::class,
\Aimeos\Cms\Models\Element::class,
\Aimeos\Cms\Models\File::class
],
])->daily();
You can configure the timeframe after soft-deleted items will be removed permantently by setting the CMS_PURGE option in your .env file. It's value must be the number of days after the items will be removed permanently or FALSE if the soft-deleted items shouldn't be removed at all.