Basic boilerplate content management system for starters, supports Laravel 9.0.
- Admin Panel
- Custom template with Bulma
- Google Analytics API integrated dashboard
- Server side oriented datatables
- Page, category, and article management
- Trumbowyg as the WYSIWYG editor
- elFinder as the file manager
- Feather Icons as the icon package
- Front-end
- Custom template with Bulma
- View pages, articles and categories
Clone this repository and install the dependencies.
$ git clone https://github.com/ozdemirburak/laravel-9-simple-cms.git && cd laravel-9-simple-cms
$ composer install
Run the command below to initialize. Do not forget to configure your .env file.
$ php artisan cms:initialize --seed
Install node and npm following one of the techniques explained in this link to create and compile the assets of the application.
$ npm install
$ npm run production
Finally, serve the application.
$ php artisan serve
Open http://localhost:8000 from your browser.
To access the admin panel, hit the link
http://localhost:8000/admin from your browser.
The application comes with default user with email address [email protected]
and 123456
.
Either Clone the repository using git clone: git clone https://github.com/ozdemirburak/laravel-9-simple-cms.git
or install via zip and extract
to any of your folders you wish.
To install the composer dependencies you need to have composer installed, if you don't have composer installed,
then follow these instructions. Finally run, composer install
in the laravel-9-simple-cms
directory.
Run php artisan cms:initialize --seed
which will ask you to create a database to migrate and seed our boilerplate application
with fake data. Do not forget that all variables with DB_
prefixes in your .env
file relates to your database configuration.
After configuring your .env
file, with the proper data, you need to create the assets.
If you do not have node and npm installed, follow one of the techniques explained in this link.
Then, to install our boilerplate project's asset dependencies, run npm install
. Finally to combine the
javascript and style files run npm run production
.
To serve the application, you can use php artisan serve
, then open http://localhost:8000
from your browser. To access the admin panel, hit the link http://localhost:8000/admin
from your browser. The application comes with default user with email address [email protected]
and 123456
.
If you want to use the Gmail client to send emails, you need to change the MAIL_USERNAME
variable as your
Gmail username without @gmail.com
and password as your Gmail password, MAIL_FROM_ADDRESS
is your
Gmail account with @gmail.com
and MAIL_FROM_NAME
is your name that is registered to that Gmail account.
To use the Analytics API, and have all the features of the dashboard, follow the instructions explained in detail here. You will also need a key for Google Javascript API, has the instructions here. Also if you want to use CAPTCHA in the login form, you will also need to secrets and keys from here.
Finally, if you need to re-initialize our simple boilerplate CMS, just run the command below where it will also update the assets for you.
$ php artisan cms:initialize --seed --node
Lets assume we want to create a new resource for fruits where it will have title, description and content attributes.
$ php artisan cms:resource fruit --migrate
You will see an output like below. The CMS generator will do ALL the boring stuff for you, it will create a migration file with a title, description, content, and slug columns by default, also the respecting Controller and Model files, it will also add the resource to routes, RouteServiceProvider, even it will add the basic language key value pairs to the language file.
Just check and edit the files below to proceed.
Created file: database/migrations/2018_10_19_000000_create_fruits_table.php
Created file: app/Models/Fruit.php
Created file: app/Http/Controllers/Admin/DataTables/FruitDataTable.php
Created file: app/Http/Controllers/Admin/FruitController.php
Created file: resources/views/admin/forms/fruit.blade.php
Added route to: routes/admin.php
Added resource language key to: resources/lang/en/resources.php
Added model binding to: app/Providers/RouteServiceProvider.php