sgrayme / Quarx

A CMS for Laravel Apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quarx - A CMS for Laravel apps

Codeship

Quarx is a full fledged CMS that can be added to any Laravel application. It provides you with full control of things like: pages, menus, links, widgets, blogs, events, faqs etc.

Quarx comes with a module builder for all your custom CMS needs, as well as a module publishing tools. So if you decide to reuse some modules on future projects you can easily publish thier assets seamlessly. If you wish to make your Quarx module into a PHP package, then you will need to have it publish its assets to the quarx/modules directory.

Documentation

http://quarx.info

Installation

  • Run the following command:
composer require yab/quarx
  • Add the following to your Providers:
Yab\Quarx\QuarxProvider::class
  • Then run the vendor publish:
php artisan vendor:publish --provider="Yab\Quarx\QuarxProvider"
  • Then migrate:
php artisan migrate
  • Then add to the Kernel Route Middleware:
'quarx' => \App\Http\Middleware\Quarx::class,

In order to have modules load as well please add the following to your composer file:

"Quarx\\": "quarx/",

This should be added to the autoloader below the App itself.

Quarx Access

Quarx requires Laracogs to run (only for the FormMaker), but Laracogs does not require you to use its version of roles. But you will still need to ensure some degree of control for Quarx's access. This is done in the Quarx Middleware, using the gate and the Quarx Policy. If you opt in to the roles system provided by Laracogs, then you can replace 'quarx' with admin to handle the Quarx authorization, if not, you will need to set your own security policy for access to Quarx. To do this simply add the Quarx policy to your app/Providers/AuthServiceProvider.php file, and ensure that any rules you wish it to use are in within the policy method. We suggest a policy similar to below.

Quarx Policy:

$gate->define('quarx', function ($user) {
    return (bool) $user;
});

Using Laracogs:

$gate->define('quarx', function ($user) {
    return ($user->roles->first()->name === 'admin');
});

About

A CMS for Laravel Apps


Languages

Language:JavaScript 66.5%Language:PHP 25.2%Language:CSS 8.2%