- PHP >= 8.0
- Composer 2
- MariaDB / MySQL
This package can be installed as a Composer dependency.
"repositories": [
{
"type": "vcs",
"url" : "[email protected]:web-id-fr/cms.git"
}
]
composer require webid/cms
php artisan vendor:publish --provider="Webid\Cms\CmsServiceProvider" --force
php artisan vendor:publish --provider="Webid\Cms\CmsServiceProvider"
make install_db
"extra": {
"laravel": {
"dont-discover": [],
"providers": [
"Webid\\ComponentTool\\ToolServiceProvider"
]
}
}
"autoload": {
"psr-4": {
"Webid\\ComponentTool\\" : "nova-components/ComponentTool/src/"
},
},
"require": {
"webid/component-item-field": "*",
},
"repositories": [
{
"type": "path",
"url": "./nova-components/ComponentItemField"
}
]
Then run composer update
You have to remove all routes from your routes/web.php
file to make sure
the cms will work properly.
If the project is a fresh Laravel project, you may have some generated code like this to remove :
Route::get('/', function () {
return view('welcome');
});
Run command php artisan storage:link
.
If you want to allow robots to access your sitemap, add this line in the robots.txt
file :
Sitemap: https://www.your-domain.com/sitemap.xml
⚠ Replace www.your-domain.com
by your actual website domain.
To disable the tracking of robots, you must add in the .env DISABLE_ROBOTS_FOLLOW=true
To use the cookies popin, just fill the resources/views/warning_cookies.blade.php
view, include it in resources/views/template.blade.php
with the js public/cms/js/cookies.js
do not modify the file send_form.js
!
Edit the helper.js
file with the form front information to display errors and the success message.
Added to package.json
:
"dropzone": "^5.7.0",
"lang.js": "^1.1.14"
In the webpack.mix
file, add the send_form_js
file. The file is already linked in the front.
You can change the form frontend but DO NOT TOUCH the submit_form
class for sending forms.
Don't forget to create a service to display the languages as you need them. Use this service into a ViewServiceProvider to share both languages and translated slugs to views.
To create the service provider, you can run :
php artisan make:provider ViewServiceProvider
⚠ Don't forget to add the service provider in the file config/app.php
.
You can change the design of the mail template but do not delete or modify the existing code! The present code allows you to display the fields of the form sent in the email.
public/cms/images/components/gallery_component.png
public/cms/images/components/newsletter_component.png