Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

czim/laravel-cms-core

Repository files navigation

Latest Version on Packagist Software License Build Status Coverage Status

Deprecation warning

Word of warning: I'm not seriously keeping this project up to date. This will not affect the core much, but the models module is not likely to keep working for the newest Laravel versions.

The reason for this is that there's no sense in attempting to compete with Nova, Twill, etc.

  • I still believe in the project, but not in its being of enough interest to the community at large.

The things those CMSes should still improve on:

  • Make them 100% decoupled from application logic, data models (no extending package Eloquent model extensions Twill!)
  • Allow the freedom to choose the solutions you want for translations, sluggification, media libraries, etc. (Twill)
  • Work with small strategy classes, not repository & controller spaghetti (Twill)
  • Work with objects, not arrays (looking at myself, and Twill)
  • Quick and simple frontend, allow for easy tweaks (Nova)

CMS for Laravel - Core

So you're looking for a Laravel CMS, and ...

  • you don't want to mold your app to conform to the CMS,
  • you need it to handle Eloquent models that are Translatable, Listified, or have your custom traits without any problems,
  • you want to offer your clients interfaces that can always be molded to their eccentric preferences,
  • you want it to be easily set up in both fresh applications as well as time-worn codebases,
  • you don't want to be stuck with some standard theme,
  • and you don't want your CMS configuration to be outside of your project's code repository.

Look no further. This CMS was developed with all this in mind.

Version Compatibility

Laravel Package
5.3 1.3
5.4 1.4
5.5 1.5
5.6, 5.7 1.6
5.7 1.7
5.8 1.8
6.0 2.0
7.0 3.0

Note that version 1.7+ requires czim/laravel-dataobject 2.0+.

Changelog

View the changelog.

A Framework CMS

The core concept behind this CMS: it is a framework.

What makes Laravel great? The fact that it is easy to do simple things with it, and it is powerful and flexible enough to let you do whatever you want with it.

A framework offers developers a tool that lets them work on business logic rather than the boring, repetitive basics. It is a tool that derives its value from letting programmers write code and take control wherever and however they want.

This CMS is similar to most Laravel CMSes in that it offers a convenient way to quickly set up a user-friendly tool for managing data. Where it differs is in being structured through-and-through as a framework: in a way that lets developers modify its behavior by writing code. All parts of this CMS are written under the assumption that someone may want to, and should be able to, change the way things work.

It does this by using Laravel's service container, abstract bindings that you can replace using configuration files, and strategy classes that may be easily swapped out. At the top level, the CMS is modular and component-based, making it easy to add, remove or fork and replace any part of it.

Core

This is the Modular CMS Core, which manages the basics of configuring, accessing and deferring to modules.

The core offers:

  • Module management, including module based routing and authorization,
  • CMS provision, loading required service providers,
  • The basics for a dedicated API for the CMS,
  • Segregated database migrations and the commands to manage them,
  • The basics for user notification,
  • Some basic debugging tools to help analyze loaded modules.

Heads-up / Disclaimer

This project is currently under heavy development, but it is ready for production environments. It is only recommended for experienced programmers, however. Feedback is welcome, as always.

Documentation

The CMS core is not a stand-alone package. Some components and modules are required to start using the CMS.

Where Do I Start?

Beyond a very basic setup, this CMS has a bit of a learning curve. Here are some suggested approaches to getting started; pick any that best suit your needs.

  • Install a pre-configured demo Laravel application with the CMS fully installed. If you're just curious what a basic installation of the CMS can do or what it looks like, this showcase is a good place to start. Just check out the repository and follow a few simple steps to get the example running locally.

  • Follow a step-by-step installation guide to try the CMS out in your own Laravel application. This can be a freshly installed copy of Laravel, or a pre-existing application in any stage of development. This CMS is designed to be mostly a drop-in solution.

  • Explore available components and modules.

There is currently no public live example online. The quickest way to get a peek at this CMS is the first approach listed above.

Reference Material

You can find more information here:

Troubleshooting

If you encounter problems, please first consult the troubleshooting section.

When does not help, posting an issue report is much appreciated.

API Documentation

The documentation for the API endpoints provided by the core may be found here: czim.github.io/laravel-cms-core.

Installation

Middleware

To prevent conflicts with the Apps middleware, you may add the following method to your App\Http\Kernel class:

    /**
     * Removes all global middleware registered.
     */
    public function removeGlobalMiddleware()
    {
        $this->middleware = [];
    }

While the CMS registers, it will automatically call this if it is available. This would make sure that neither the CMS nor the App end up with clashing middleware.

You do not need this if you have no global middleware defined; group or route middleware are not affected by this and won't be problematic in any case.

Configuration

Database

You can set a database driver and/or a prefix. If you set a driver, make sure that it exists in your application's database.php config file.

Note that if you set a driver that has a prefix and you add a CMS prefix aswell, that these will stack.

Cache

If you want to use the tags to segregate your CMS cache content, make sure you use a tags-capable driver, such as Redis.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.