Decoupled CMS for any Laravel app, gain control of: pages, blogs, galleries, events, images, custom modules and more.

Overview

Grafite CMS

Grafite has archived this project and no longer supports or develops this code. We recommend using only as a source of ideas for your own code.

CMS - Add a CMS to any Laravel app to gain control of: pages, blogs, galleries, events, custom modules, images and more.

Build Status Packagist license

Grafite CMS 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. Grafite CMS 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 Grafite CMS module into a PHP package, then you will need to have it publish its assets to the cms/modules directory.

What is simple vs complex setup?

Simple setup uses Grafite Builder as the backbone of an app for you using Laravel, once the setup command has been run you will have a full CMS as an app. Complex setup is specifically for developers who want to add a CMS to their existing app.

Author(s):

General Requirements

  1. PHP 7.1.3+
  2. MySQL 5.7+
  3. OpenSSL

Compatibility and Support

Laravel Version Package Tag Supported
5.8.x 3.3.x no
5.7.x 3.x.x no
5.6.x 3.0.x no
5.5.x 2.4.x no
5.4.x 2.3.x no

Documentation

Installation

Create a new Laravel application, and make a database somewhere and update the .env file.

  • Run the following command:
composer require grafite/cms
  • Then run the vendor publish:
php artisan vendor:publish --provider="Grafite\Cms\GrafiteCmsProvider"

!!! Tip "If you wish to use the publish datetime picker - set your app's timezone config to correspond with your location"

Simple Setup

!!! warning "The simple setup requires a fresh Laravel application."

If you're looking to do a simple website with a powerful CMS, and the only people logging on to the app are the CMS managers. Then you can run the setup command, it will install everything it needs, run its migrations and give you a login to start with. Take control of your website in seconds.

php artisan grafite:cms-setup

Now you're done setup. Login, and start building your amazing new website!

You can login as an admin with the following credentials:

U: [email protected]
P: admin

Complex Setup

!!! warning "Complex setup is needed for applications that have already have existing code including the login/logout set up."

If you just want to add Grafite CMS to your existing application and already have your own application running then follow the instructions below:

  • Add the following to your routes provider:
require base_path('routes/cms.php');
  • Add the following to your app.scss file, you will want to modify depending on your theme of choice.
@import "resources/themes/default/assets/sass/_theme.scss";
  • Then migrate:
php artisan migrate
  • Then add to the Kernel Route Middleware:
'cms' => \App\Http\Middleware\GrafiteCms::class,
'cms-api' => \App\Http\Middleware\GrafiteCmsApi::class,
'cms-language' => \App\Http\Middleware\GrafiteCmsLanguage::class,
'cms-analytics' => \Grafite\Cms\Middleware\GrafiteCmsAnalytics::class,

In order to have modules load as well please edit the autoload psr-4 portion to your composer file:

"autoload": {
    ...
    "psr-4": {
        "App\\": "app/",
        ...
        "Cms\\": "cms/"
        }
}

CMS Access

Route to the administration dashboard is "/cms/dashboard".

Grafite CMS requires Grafite Builder to run (only for the FormMaker), but Grafite CMS does not require you to use the Grafite Builder version of roles. But you will still need to ensure some degree of control for Grafite CMS's access. This is done in the Grafite CMS Middleware, using the gate and the Grafite CMS Policy. If you opt in to the roles system provided by Grafite Builder, then you can replace 'cms' with admin to handle the Grafite CMS authorization, if not, you will need to set your own security policy for access to Grafite CMS. To do this simply add the Grafite CMS 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.

Possible CMS Access Policy:

Gate::define('cms', function ($user) {
    return (bool) $user;
});

Gate::define('cms-api', function ($user) {
    return true;
});

Or Using Grafite Builder:

Gate::define('cms', function ($user) {
    return ($user->roles->first()->name === 'admin');
});

Fun Route Trick

If you're looking for clean URL pages without having to have the URL preceed with page or p then you can add this to your routes.

Make sure you put it at the bottom of the routes or it may conflict with others.

Route::get('{url}', function ($url) {
    return app(App\Http\Controllers\Cms\PagesController::class)->show($url);
})->where('url', '([A-z\d-\/_.]+)?');

Roles & Permissions (simple setup only)

With the roles middleware you can specify which roles are applicable separating them with pipes: ['middleware' => ['roles:admin|moderator|member']].

The Grafite CMS middleware utilizes the roles to ensure that a user is an 'admin'. But you can elaborate on this substantially, you can create multiple roles, and then set their access in your app, using the roles middleware. But, what happens when you want to allow multiple roles to access the CMS but only allow Admins to access your custom modules? You can use permissions for this. Similar to the roles middleware you can set the permissions ['middleware' => ['permissions:admin|cms']]. You can set custom permissions in config/permissions.php. This means you can set different role permissions for parts of your CMS, giving you even more control.

API Endpoints

Grafite CMS comes with a collection of handy API endpoints if you wish to use them. You can define your own policies for access and customize the middleware as you see fit.

Token

The basic Grafite CMS API endpoints must carry the Grafite CMS apiToken defined in the config for the app. This can be provided by adding the following to any request:

?token={your token}

** All published and public facing data will be available via the API by default.

/cms/api/blog
/cms/api/blog/{id}
/cms/api/events
/cms/api/events/{id}
/cms/api/faqs
/cms/api/faqs/{id}
/cms/api/files
/cms/api/files/{id}
/cms/api/images
/cms/api/images/{id}
/cms/api/pages
/cms/api/pages/{id}
/cms/api/widgets
/cms/api/widgets/{id}

Images

Images are resized on upload for a better quality response time. They follow the guidelines specified in the config under cms.max-image-size.

S3

Regarding S3 bucket usage. You will need to set the permissions accordingly to allow images to be saved to your buckets. Then you need to set your buckets to allow public viewing access. This is an example of such a policy.

{
    "Version":"2008-10-17",
    "Statement":[{
        "Sid":"AllowPublicRead",
        "Effect":"Allow",
        "Principal": {
            "AWS": "*"
        },
        "Action":["s3:GetObject"],
        "Resource":["arn:aws:s3:::MY_BUCKET/public/images/*"]
    }]
}

Replace MY_BUCKET with your bucket name.

FileSystem Config

If using S3 you will need to add the following line to your filesystem config: 'visibility' => 'public',

Also Provides

The Grafite CMS package also provides the following packages:

  • DevFactory/Minify
  • Grafte/Builder

Config

Grafite CMS has a rather elaborate config with many options available. You can expand the core modules, enable / disable features, and configure so much more.

Key Description
analytics Choose an analytics engine for the dashboard (internal or google)
pixabay Your pixabay API code
db-prefix Add a prefix to the Grafite CMS content tables
live-preview Preview your site in the editor view
frontend-namespace Sets the default namespace for the frontend code
frontend-theme The theme for the frontend
load-modules Do you want to load the external modules
module-directory Directory for custom Grafite CMS modules
active-core-modules Which core Grafite CMS modules are active
rss A set of attributes which can be set for the RSS feed
site-mapped-modules The module urls and their repositories that build the site map XML
auto-translate Automatically translate your content to other languages with Google Translate
default-language Your website's default language
languages Languages available in your website (enables their tabs in the editor)
storage-location Storage for files/ images (s3 or local)
max-file-upload-size The maximum file size for upload (Must also be set in php.ini)
preview-image-size When uploading images we cache clones at a smaller size (default: 800)
cloudfront Set a cloudfront URL to swap for the S3 bucket link
backend-title A title for the CMS (default: cms)
backend-route-prefix The route prefix for the backend of the CMS (default: cms)
backend-theme Theme for the backend (standard
registration-available Enable or disable registration
pagination Results per pack in backend
api-key Api Key for the Redactor photo and file injection
api-token Api Token for the Redactor photo and file injection, and the general external API calls
forms Forms config for core modules

API

Grafite's CMS API is very simple, and it has a VERY simple auth system using a single token which can be defined with in your env. You can easily use this to manage integration with various platforms etc. The general base route for all API requests is:

/cms/api/{resource-url}?token={CMS_API_TOKEN}
URL Resource
blog Blog
events Events
endorsements Endorsements
faqs FAQs
files Files
images Images
pages Pages
widgets Widgets

Each of these routes can be called or, you can also get a specific resource instance with the ID:

Example:

/cms/api/blog/1?token=9a78sd6f9as6df9

Multilingual

Translations

All too often we need translations in our sites and even our apps. Grafite CMS has got a very simple way of handling multiple languages. Translations is set up so that in the config if you add any languages to the languages array you will be able to define custom entries for those languages.

Auto-Translate

auto-translate: false

In order to enable the auto-translate ensure that it is set to true in your config.

Translatable Modules

Simply add the translatable trait to your module's model and then update your modules to follow a similar pattern to the Grafite CMS pages structure see the following files for reference:

Grafite\Cms\Controllers\PagesController
Grafite\Cms\Repositories\PageRepository
Grafite\Cms\Models\Page

Archiving and Clean up:

You will need to extend CmsModel rather than the default Model. It will also need to use the Translatable Trait.

use Grafite\Cms\Models\CmsModel;
use Grafite\Cms\Traits\Translatable;

class Books extends CmsModel
{
    use Translatable;
}

You will also need to set bindings similar to this in your module event provider.

'eloquent.saved: Grafite\Cms\Models\Page' => [
    'Grafite\Cms\Models\Page@afterSaved',
],
'eloquent.created: Grafite\Cms\Models\Page' => [
    'Grafite\Cms\Models\Page@afterCreate',
],
'eloquent.deleting: Grafite\Cms\Models\Page' => [
    'Grafite\Cms\Models\Page@beingDeleted',
],

These bindings ensure that when you save you create an archive of the previous entry, and on deleting of a item the system clears out any translations and archives it left behind. The created binding allows for the auto-translate so you can utilize the power of Google Translate.

Language Links

Grafite CMS comes with a blade directive which generates links for your supported languages and provides a simple way to swap between the languages of a single page or blog entry while remaining on the same URL.

Supporting Language URL Prefixes

By default we support the use of cookies to handle languages and swapping them. Since each page/blog/event etc can have a specific url relative to its language with this current build there isn't much point to the prefixes for languages. But, that being said, sometimes its handy so here is an easy way to add support for it.

Just add this code to the map() method in the RouteServiceProvider.php:

$segments = request()->segments();
$supportedLanguages = array_keys(config('cms.languages'));

if (isset($segments[0]) && in_array($segments[0], $supportedLanguages)) {
    $language = $segments[0];
    unset($segments[0]);
    return redirect(implode('/', $segments))->withCookie('language', encrypt($language))->send();
}

Promotions

Much like the term implies promotions are like advertisements. They are intended to be treated like widgets, the main difference is that they have time scopes. This means you can put together promotional materials and content and set their publish date and time, as well as a finished at date and time to have the promotion disappear. This makes it very easy to schedule launches of campaigns etc.

@promotion('slug')

You can set these on any theme files. We recommend you leave them in the theme files and simply change the content and dates when you need to.

Themes

Grafite CMS has a full scope theming tool built right in. You can easily generate basic themes that can be built on and kept clear of your views. All the listed templates with a star are optional - otherwise everything else is required, for the basic support.

Basic Theme Structure

  • assets
    • js
      • theme.js
    • sass
      • _basic.scss
      • _theme.scss
  • blog
    • all.blade.php
    • featured-template.blade.php
    • show.blade.php
  • events
    • all.blade.php
    • date.blade.php
    • calendar.blade.php
    • featured-template.blade.php
    • show.blade.php
  • faqs
    • all.blade.php
  • gallery
    • all.blade.php
    • show.blade.php
  • layout
    • master.blade.php
  • pages
    • all.blade.php
    • featured-template.blade.php
    • home.blade.php
    • show.blade.php
  • partials
    • navigation.blade.php
  • public
    • img

You have the ability to include other theme views into your view using the @theme('path') directive with Blade. Otherwise its basically anything and everything Blade can do including any directives you wish to expand it with.

Blade Directives

Grafite CMS has some custom directives added to Blade which allows you to include files from your theme easily, as well as other parts.

@theme('path.to.view')

You can always add the cms-frontend:: namespace to the @include('path') or instead use @theme('path').

@block('slug')

Create unique and elegant designs with block directives in your templates for pages and blogs.

!!! Warning With the block blade directive you do not specify the module it needs to load, it determines that from the first string in the request URL. It will default to page if no matching module name matches the URL. In the case of something like events, it expects the variable in the template to be $event. It is wrapped in the optional method to protect the view from breaking the app.

@menu('slug')

Easily add menus to your views with the menu blade directive.

@modules(['modules-to-ignore'], 'link-class', 'list-item-class')

Generate links to modules automatically (Bootstrap 4 by default).

@widget('slug')

Add widgets to your views with the menu blade directive, just specify the SLUG.

@image('id', 'class')

Provides an image URL with an html tag and extra for adding a class

@image_link('ID')

Provides an image URL

@images('tag')

Images will be provided as an array, and if you skip the tag then the method will return all images, otherwise it follows the tagging.

@edit('module', 'id')

There is also the Grafite CMS Service which can be run inside your blade views. Its as simple as {{ Cms::method() }}

@markdown('content')

Convert your markdown blog or page entries into HTML.

@languages('link-class', 'list-item-class')

Generate links for each supported lanugage in your website

Helper Methods Available:

  • menu('slug', 'optional-view-path')
  • images('tag')
  • widget('slug')
  • editBtn('module', 'id')

Pages and Blocks

There are some special features for pages which are not available for other parts of the site.

Blocks

Pages are special and can often require complex designs. If your application needs some of the more abstract designs you can still use Grafite CMS for page management by using the block system.

{!! $page->block('main') !!}

or

{{ block('main') }}

By placing code like this in your template Grafite CMS will generate the main block if it does not exist yet. If it does and has content it will render the content. It's really that simple.

Publishing

Command

php artisan theme:publish {name}

The Grafite CMS theme publisher will publish the public directory only. If you want to integrate assets you need to do so using your webpack or gulp file, pending on which setup you use.

Laravel Verison Asset builder
5.4+ webpack.mix.js
5.3 gulpfile.js

Basic Theme (top tier)

  • assets
  • blog
  • events
  • faqs
  • gallery
  • layout
  • pages
  • partials
  • public
    • img

Symlink

Command

php artisan theme:link {name}

The Grafite CMS theme link tool will create a symlink between your public folder and a folder in your public directory called theme. This can make it easier to manage assets within a theme.

Laravel Verison Asset builder
5.4+ webpack.mix.js
5.3 gulpfile.js

Basic Theme (top tier)

  • assets
  • blog
  • events
  • faqs
  • gallery
  • layout
  • pages
  • partials
  • public -> {app_directory}/public/theme
    • img

Modules

Grafite CMS comes with a handful of modules for handling a basic application/website including: Images, Files, Blog, Pages, Faqs, etc. Below you will find a full listing of the modules that come pre-packaged with Grafite CMS. In order to create your own Modules and ensure that they are loaded you MUST add "Cms\\": "cms/" to the PSR-4 group in your composer.json file.

Pre-packaged Modules

  • Blog
  • Pages
  • Menus
  • Widgets
  • Faqs
  • Images
  • Files
  • Events

You have the freedom to make any modules you want. You can use the artisan module:make or the artisan module:crud to generate them and then artisan module:publish to publish their contents.

Assets

Grafite CMS modules have an Assets directory which is intended to contain all your JS and SASS or CSS. In order to load the Assets in your Module, you can use the Cms facade.

Grafite CMS comes with a Minify package so you can easily load your modules assets with calls like below. You don't have to set the content-type. But pending on what you're loading you may want to override what the Cms service determines is the content-type.

So if you want to load your css file in your Sample module's Assets you could do the following:

Assets/css/styles.css is the file we're grabbing.

<link rel="stylesheet" type="text/css" href="{{ Cms::moduleAsset('sample', 'css/styles.css', 'text/css') }}">

Or we can load some JavaScript, and yes jQuery is already inside Grafite CMS.

Assets/js/module.js is the file we're grabbing.

<script type="text/javascript" src="{{ Cms::moduleAsset('sample', 'js/module.js', 'application/javascript') }}"></script>

Composer

So now you've made a CMS module and it's serving your application well, but now you've decided that it would make more sense for it to be a composer package, that you can run inside any app for easier maintenance. This also gives you far more freedom to decide how you wish to integrate the module into your app.

module:composer {name} {namespace}

This will generate a composer file, as well set the namespace of your module to a new package namespace.

Config

The configs are autoloaded and are added to the cms config.

config('cms.modules.sample') // would retrieve the sample modules internal config.php contents

If you want to access a config that is customizable for your module you can publish one:

php artisan vendor:publish

CRUD

Grafite CMS can generate custom CRUD modules for your application giving it all the power you want as fast as possble. Simply run the command: php artisan module:crud and discover the many hidden powers inside the Grafite CMS. The CRUD generator will produce a module with basic unit tests started. You would then need to setup your migrations etc, and then publish the module to your app. Check out the publishing for more details.

Forms

You can use the Form Maker tool which is provided by Grafite Builder

Redactor

You can utilize redactor (the WYSIWYG) in your CRUD by adding .redactor to any textarea class.

Images and Files:

Inside the redactor instance you can easily add images and files which you have uploaded to Grafite CMS. Its as easy as clicking them to have them added to the entry.

Front-end/ Theme

When you generate a module the system will also generate a front-end or theme component which is kept in the Publishes directory. The is the portion of code that your visitors will see. You will need to publish this code using the php artisan module:publish {name} command. Provided you leave the module inside the cms/modules directory. However, you can also make your module into a composer package.

Files & Images

Grafite CMS is always concerned with security of what you provide, the potential open doors in your website/ app. As such, the Files which are uploaded to the CMS are locked outside of the public access points.

What does this mean?

This means that when you're website is providing these to visitors they are actually getting them through an API access point. This is done to ensure that the files do not reveal thier location. This means that no webscrappers can crawl your directories and take off files they shouldn't be, including files that have yet to be released.

Storage Location

In the config you can set the storage location for your file uploads. This can be either S3 or local. To get S3 to work correctly you need to configure Laravel as you would with S3. Grafite CMS will take it from there. So simply add your details to the config and it should work. The CMS loads all the third-party packages you will need.

Make

Grafite CMS has a powerful CRUD builder. But lets say you want to have a custom module that integrates with another service or doesn't involve a CRUD at all. Then the php artisan module:make command will be your best tool. It will create a minimum viable module with a very basic admin layer and client layer which you can customize as you see fit.

Redactor

You can utilize redactor in your module by adding .redactor to any textarea class.

Images and Files:

Inside the redactor instance you can easily add images and files which you have uploaded to the CMS. Its as easy as clicking them to have them added to the entry.

Front-end/ Theme

When you generate a module the system will also generate a front-end or theme component which is kept in the Publishes directory. The is the portion of code that your visitors will see. You will need to publish this code using the php artisan module:publish {name} command.

Publish

All custom modules will need to have their Publishes folder published in order to have their code added to you app. We've wrapped this into one simple command:

php artisan module:publish

Running this will place the files in the matching folders in your app. So if you want to have files put in migrations make sure your Publishes folder has a migration file in a directory like this:

Publishes/database/migrations/migration_file.php

If you switch themes in Grafite CMS you will need to republish your module. The views are added directly into the themes.

License

Grafite CMS is open-sourced software licensed under the MIT license

Redactor License

Grafite has an OEM licence for the use of Redactor in the Grafite CMS package. You are fully welcome to use Grafite CMS package and incorporate it into any apps you build, you are permitted to offer those apps as SaaS or other products. However, you are not entitle to strip out parts of Redactor and resell them, please see this license for more information

Bug Reporting and Feature Requests

Please add as many details as possible regarding submission of issues and feature requests

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • CMS breaks spatie/laravel-permission roles.

    CMS breaks spatie/laravel-permission roles.

    Describe the bug CMS package breaks the https://github.com/spatie/laravel-permission roles. The users always has all possible roles in the system.

    To Reproduce Steps to reproduce the behavior:

    1. Setup /spatie/laravel-permission with some roles and permissions.
    2. Setup cms with https://docs.grafite.ca/cms/#complex-setup
    3. Dump authorized user roles.

    Expected behavior Should only show the assigned roles.

    Additional context I expect it's something to do with the builder, but I'm not really sure. As it requires you to set it up to use the role functionality, but I haven't done anything like that. I have been ripping my hair out trying to figure out whats wrong. Any help appreciated.

    EDIT: As a side note, permissions actually work fine, it's the role part that doesn't work as it for some reason links all the roles to a user.

    EDIT 2: After even more debugging I have found out that this seems to only happens on the home page.

    opened by davisriska 13
  • Image uploading.

    Image uploading. "The location field is required"

    Hello,

    It seems like image uploading has stopped working. Whenever I try to save an image I get the following message: "The location field is required"

    It used to work properly in the past. Do you know what might be the issue?

    Cheers!

    opened by johnmans 11
  • Pixabay 500 error on insert

    Pixabay 500 error on insert

    Hey there,

    I seem to be getting 500 errors on the insert function for the stock images selection.

    I can search and go through pages of the images totally fine, but on selection of an image nothing happens on the front-end.

    In my console I get these errors

    pixabay-errors
    opened by artemartemov 11
  • Cannot upload files / image -

    Cannot upload files / image - "The location field is required"

    Describe the bug I cannot add files and images through the backend of the CMS. I keep getting the error:

    The location field is required.

    To Reproduce Steps to reproduce the behavior:

    1. Go to files
    2. Click on add new
    3. Choose an image
    4. See the error

    Expected behavior Should upload the file / image

    Screenshots If applicable, add screenshots to help explain your problem. 2018-08-30_09h23_05

    Desktop (please complete the following information):

    • OS: [e.g. Windows 10]
    • Browser: Chrome
    • Version 68.0.3440.106

    Additional context

    inspecting 
    opened by shabaz-ejaz 10
  • Multilanguage case: improper language url and correspondent tab when editing a module item

    Multilanguage case: improper language url and correspondent tab when editing a module item

    When editing a module item in admin panel -> the form fields from the first language are displayed ("default-language" in quarx.php), but the last language tab is highlighted and the correspondent language url is not being loaded

    opened by Mariana-Marica 10
  • Error at module creation

    Error at module creation

    When i'm trying to create a module, i receive an error and after this Laravel is broken

    Steps that i've made:

    - fresh laravel install
    
    - composer require yab/quarx
    
    - add 'Yab\Quarx\QuarxProvider::class,' to my Provider
    
    - php artisan vendor:publish --provider="Yab\Quarx\QuarxProvider"
    
    - run php artisan quarx:setup (+ npm install)
    
    - i added this to my composer "Quarx\\": "quarx/",
    
    - i made composer dump-autoload -o and composer install
    
    - the package works ok until now
    
    - i want to make a new module
    
    - i changed the ModuleCrud.php on line 202 to get the right file("P" letter as i said on previous issue)
    
    - then i run artisan module:crud Groups
    
    - i receive 
       *** You will need to publish your module to make it available to your vistors:
        php artisan module:publish Groups
        Add this to your app/Providers/RouteServiceProver.php in the mapWebRoutes method:
        require base_path('routes/groups-web.php');
        You may wish to add this as your testing database
        'testing' => [ 'driver' => 'sqlite', 'database' => ':memory:', 'prefix' => '' ],
        Module for Group is done. ***
    
    - question: need to have routes/groups-web.php? because is not generated by the command
    
    - from this point I CAN'T START laravel. any command return this:
      ***  PHP Fatal error:  Class '\Quarx\Modules\Groups\GroupsModuleProvider' not found in /var/www/html/laravelQuarx/vendor/laravel/framework/src/Illuminate/Foundation/Application.php on line 606
       [Symfony\Component\Debug\Exception\FatalErrorException]       
            Class '\Quarx\Modules\Groups\GroupsModuleProvider' not found  ***
    
    -  also i saw that in kernel.php on protected $routeMiddleware i have two times the
           *** 'quarx' => \App\Http\Middleware\Quarx::class,
    	'quarx-api' => \App\Http\Middleware\QuarxApi::class,
    	'quarx-analytics' => \Yab\Quarx\Middleware\QuarxAnalytics::class,
    	'quarx-language' => \App\Http\Middleware\QuarxLanguage::class,
    	'admin' => \App\Http\Middleware\Admin::class,
    	'active' => \App\Http\Middleware\Active::class,***
    

    not sure that is ok. i guess one time is ok.

    opened by mip-ro 10
  • Class PagesController does not exist

    Class PagesController does not exist

    Class PagesController does not exist. I've created this into an existing site and I get this error on some pages including home page, and trying to view live page after creating one.

    PagesController looks to sit under app/Http/Controllers/Quarx. I've also set the Quarx namespace in the composer.json under psr-4 as instructions.

    Any ideas what I'm doing wrong?

    ReflectionException in Container.php line 719:
    Class Quarx\PagesController does not exist
    in Container.php line 719
    at ReflectionClass->__construct('Quarx\\PagesController') in Container.php line 719
    at Container->build('Quarx\\PagesController') in Container.php line 598
    at Container->resolve('Quarx\\PagesController') in Container.php line 567
    at Container->make('Quarx\\PagesController') in Application.php line 702
    at Application->make('Quarx\\PagesController') in Route.php line 217
    at Route->getController() in Route.php line 736
    at Route->controllerMiddleware() in Route.php line 697
    at Route->gatherMiddleware() in Router.php line 572
    at Router->gatherRouteMiddleware(object(Route)) in Router.php line 552
    at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 520
    at Router->dispatchToRoute(object(Request)) in Router.php line 498
    at Router->dispatch(object(Request)) in Kernel.php line 174
    at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 30
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Debugbar.php line 51
    at Debugbar->handle(object(Request), object(Closure)) in Pipeline.php line 148
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
    at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 148
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
    at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 102
    at Pipeline->then(object(Closure)) in Kernel.php line 149
    at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
    at Kernel->handle(object(Request)) in index.php line 53
    
    opened by jonathan-bird 9
  • menu entries for a new created module

    menu entries for a new created module

    I'm not really sure that is an issue but from what i understand:

    • in vendor/yab/quarx/src/Services/ModuleService.php i have a foreach which render modules from quarx module directory(which is ok because my modules are there) and after this load what i have in config('quarx.modules')(which i'm not sure what contain; can't see in config/quarx.php). i believe what i have in config on active-core-modules are automatically loaded. the idea is if i create a module, in admin menu appear two times(at least for CRUD modules). no time now to see exactly. maybe i'm wrong.
    opened by mip-ro 9
  • Request: Change of translation concept

    Request: Change of translation concept

    Hi,

    I have used this CMS now in every detail for a multi language page and the translatable function including all the if/else in the view is not very good. This includes also the possibility to search across pages and blog entries. The database selection is not very efficient.

    What do you think about to extend the config file by the to allowed languages and take this as an additional key in all tables. So we do not need an own translatable function and table anymore. Of course the repositories need to be extended and the where condition need to be adjusted, but if you like I can do so.

    ID LID Language Values... 1 1 EN My Text 2 1 DE Mein Text 3 1 FR ... 4 4 EN Another example 5 4 DE Ein weiteres Beispiel

    What do you think about that?

    The only issue will be, that in case of an update the already existing translations have to be migrated somehow.

    refactor 
    opened by Nowi5 8
  • Class 'Yab\FormMaker\FormMakerProvider' not found

    Class 'Yab\FormMaker\FormMakerProvider' not found

    Hello, after i tried to update my composer i got this error and now it's not letting me to use even artisan command, the only way to get rid of this error is by removing quarx but right now this is not an option.

    `Generating autoload files

    Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover

    In Application.php line 635:

    Class 'Yab\FormMaker\FormMakerProvider' not found

    Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1 `

    Thank you.

    opened by vladstroeandrei 8
  • Quarx taking over laravel blade namespace and mucking up forms

    Quarx taking over laravel blade namespace and mucking up forms

    I'm trying to use Quarx to handle the public-facing pages of a web app, unfortunately, it seems to be taking over my laravel collective forms. Within my member's section (which I have prefixed with /members to avoid messing with the quarx routes) I have forms generated by laravel blade with the following header

    {!! Form::open(['action' => 'MapsController@index', 'id' => 'availability-search-form', 'method' => 'get']) !!}

    Unfortunately, Quarx is taking over the namespacing inside this form and blade is looking for the url to generate for that form in

    Yab\Quarx\Controllers\MapsController@index not defined

    resulting in not finding my controller and the page crashing.

    if I do this:

    {!! Form::open(['action' => '\App\Http\Controllers\MapsController@index', 'id' => 'availability-search-form', 'method' => 'get']) !!}

    then it finds the correct controller, but as this app has already been under development for several months it would be a bit of a task to go back and add namespacing to every Collective form

    Is there some way to tell Quarx that it should not inject its namespace for routes that are being handled by the laravel app itself?

    opened by ajoy39 8
  • We were unable to generate your profile, please try again later(Exception).

    We were unable to generate your profile, please try again later(Exception).

    When I try to register a new user, I get this exception. I can't find what is wrong.

    C:\path\to\my\cms\app\Services\UserService.php

    public function create($user, $password, $role = 'member', $sendEmail = false)
              {
            try {
                DB::transaction(function () use ($user, $password, $role, $sendEmail) {
                    $this->userMeta->firstOrCreate([
                        'user_id' => $user->id
                    ]);
    
                    $this->assignRole($role, $user->id);
    
                    if ($sendEmail) {
                        event(new UserRegisteredEmail($user, $password));
                    }
                });
    
                $this->setAndSendUserActivationToken($user);
    
                return $user;
            } catch (Exception $e) {
                throw new Exception("We were unable to generate your profile, please try again later.", 1);
            }
        }
    
    opened by eldersoon 0
  • Update cms.php

    Update cms.php

    FileService.php, when saving images, looks for a declaration in config/cms of max-image-size, with a default to 800px:

    //cms/src/Services/FileService.php
    118    if ($isImage) {
    119            $storage = Storage::disk(Config::get('cms.storage-location', 'local'));
    120            $image = $storage->get($directory.$newFileName.'.'.$extension);
    121    
    122            $image = InterventionImage::make($image)->resize(config('cms.max-image-size', 800), null, function ($constraint) {
    123                $constraint->aspectRatio();
    124            });
    125
    126            $imageResized = $image->stream();
    127    
    128            $storage->delete($directory.$newFileName.'.'.$extension);
    129            $storage->put($directory.$newFileName.'.'.$extension, $imageResized->__toString());
    130        }
    

    this config variable is not declared, and can be confusing if trying to upload hero_images larger than 800px. Propose adding the variable to the config/cms file by default

    opened by mattkatt 0
  • Laravel 5.8 not suported

    Laravel 5.8 not suported

    installation fails on laravel 5.8.16

    To Reproduce Steps to reproduce the behavior:

    1. install fresh laravel
    2. run "composer require grafite/cms"

    Expected behavior to install

    Desktop (please complete the following information):

    • OS: Linux

    Problem 1 - Conclusion: don't install grafite/cms v3.2.2 - Conclusion: don't install grafite/cms v3.2.1 - Conclusion: remove laravel/framework v5.8.16 - Installation request for grafite/cms ^3.2 -> satisfiable by grafite/cms[v3.2.0, v3.2.1, v3.2.2]. - Conclusion: don't install laravel/framework v5.8.16 - grafite/cms v3.2.0 requires illuminate/support 5.7.* -> satisfiable by illuminate/support[5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9].

    opened by ddjikic 6
  • Issues with using laravels default pagination

    Issues with using laravels default pagination

    Trying to use this method $users->setPath('custom/url') which allows you to create a new path to preceed to pagination routes, when i apply this i see that there is sql calls to see if this path exists in pages from the grafite side of the DB.

    opened by REPTILEHAUS 0
  • Viewing HTML in the Redactor editor causes scroll bug [Chrome/Opera].

    Viewing HTML in the Redactor editor causes scroll bug [Chrome/Opera].

    Describe the bug When viewing the HTML in the Redactor editor, scrolling to the bottom of the page prevent scrolling back up - most likely caused by javascript, possibly Redactor's own script. Does not occur on Firefox or Edge.

    To Reproduce Steps to reproduce the behaviour:

    1. Go to 'Create/Edit' on any section that uses the Redactor editor.
    2. Fill the text area with enough content to cause the page to be larger than the window.
    3. Click on 'HTML' in the Redactor bar.
    4. Scroll down to the bottom of the page.
    5. Attempt to scroll back up the page using arrow keys, scroll-wheel or by dragging the scroll-bar.

    Expected behaviour Page to scroll as normal.

    Desktop (please complete the following information):

    • OS: Windows 10, using Homestead VM.
    • Browser: Chrome 71, Opera 57 (Cannot check Safari at this moment in time)

    Additional context I believe this is actually caused by the Redactor function _doFixed, found on line 12129 of redactor.js, but I cannot see anything that would call this function directly. Please note this is happening on both my customised version of the CMS view blades (which includes some extra JS), AND with the default included views and JS.

    opened by mattkatt 1
Releases(v2.3.0)
  • v2.3.0(Jan 27, 2017)

    New Laravel 5.4 support

    Added

    • New history and revert actions
    • New module composer packager
    • New internal analytics component

    Fixed

    • Parts of module generating

    Changed

    • Rollback no longer generates an archive
    Source code(tar.gz)
    Source code(zip)
  • v2.2.1(Oct 30, 2016)

    With the new logo were offering even more customizations to the UI so you give your backend the right feel. Archives and translations are now handled as migrations within the package, and when items are deleted so are the archives and translations.
    Otherwise just general fine tuning.

    Source code(tar.gz)
    Source code(zip)
  • v2.2.0(Oct 28, 2016)

    The biggest change yet to Quarx in v2, we now have full multilingual support. For new projects everything should be good to go. For older projects you'll need to publish the new assets and run the migration to get the translations table. Also make sure you update your config to fill in the missing pieces.

    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Oct 21, 2016)

    Now Quarx comes with a handy API for basic requests, as well as simple setup updates and a renaming of core modules Models and Repositories to singular rather than plural names.

    Source code(tar.gz)
    Source code(zip)
  • v1.4.19(Jul 11, 2016)

  • v1.4.15(Jul 5, 2016)

  • v1.4.4(Jun 1, 2016)

    The core modules now support published_at or Published Dates. So you can schedule your post publishings. Custom modules are also now supporting the archive on save event, which means changes can now be undone.

    *Migration Required

    This release will require you to run vendor:publish again, and then migrate.

    Source code(tar.gz)
    Source code(zip)
  • v1.4.3(May 31, 2016)

    All new single line install, now you can set up a new Laravel app, and with as little as one command with Quarx you can have your customizable super powerful CMS up and ready in as little as a couple minutes.

    Source code(tar.gz)
    Source code(zip)
  • v1.3.5(May 20, 2016)

    Massively improved loading time in admin section Improved Deletes with forms Improved Templates for custom modules Improved encryption of assets

    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Apr 17, 2016)

  • v1.1.0(Mar 22, 2016)

    Quarx is proud to now support a theming structure - providing tools to generating theme templates as well as publishing of theme public assets. You can now have a clean custom theme to your app/ site which you can easily switch for another. While still maintaining your top quality Laravel application.

    Source code(tar.gz)
    Source code(zip)
Owner
Grafite Inc
We're passionate about open source code and software products.
Grafite Inc
BaiCloud-cms is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the project website for more information.

BaiCloud-cms About BaiCloud-cms is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the

null 5 Aug 15, 2022
Add subtitles into your WordPress posts, pages, custom post types, and themes. No coding required.

Add subtitles into your WordPress posts, pages, custom post types, and themes. No coding required. Simply activate Subtitles and you're ready to go.

We Cobble 117 Dec 31, 2022
Borgert - A simple CMS to start projects in Laravel containing some modules

A simple CMS to start projects in Laravel containing some modules.Blog, Pages, Products, Mailbox, Image Gallery, Log Viewer and Users.

Borgert Inc. 300 Dec 30, 2022
Quick intro to Laravel using a custom CMS app I made

Quick intro to Laravel using a custom CMS app I made This is mainly to show an example of a small CMS being built in Laravel. CMS (Content Management

Alfred Nutile 0 Jun 2, 2014
Lara-zeus sky is simple CMS for your website. it include posts, pages, tags, and categories.

Lara Zeus Sky Lara-zeus sky is simple CMS for your website. it include posts, pages, tags, and categories. small tasks can be time-consuming, let us b

Laravel Zeus 36 Dec 24, 2022
sGallery Plugin for attaching Images and Video clips (YouTube) to a resource in the Evolution CMS admin panel.

sGallery for Evolution CMS 3 sGallery Plugin for attaching Images and Video clips (YouTube) to a resource in the Evolution CMS admin panel. Features U

Serhii Korneliuk 6 Dec 21, 2022
Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. /// Chat with us and others on Spectrum: https://spectrum.chat/twill

About Twill Twill is an open source Laravel package that helps developers rapidly create a custom CMS that is beautiful, powerful, and flexible. By st

AREA 17 3k Jan 6, 2023
Simple Bootstrap Laravel CMS. Support Laravel 8.x Can integrate into any existing Laravel project.

Simple Bootstrap Laravel CMS. Support Laravel 8.x Can integrate into any existing Laravel project. Only add few database tables with prefixes, not affect your existing database tables. Support Laravel 7.x & Laravel 6.x & Laravel 5.x & MySql & PostgreSql - Amila Laravel CMS

Alex Zeng 96 Sep 6, 2022
Laravel 5 Modules

Laravel 5 Modules Upgrade Guide Installation Configuration Naming Convension Folder Structure Creating Module Artisan Commands Facades Entity Auto Sca

Pingpong Labs 572 Dec 30, 2022
Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond.

About Craft CMS Craft is a flexible, user-friendly CMS for creating custom digital experiences on the web and beyond. It features: An intuitive, user-

Craft CMS 2.9k Jan 1, 2023
SoyCMS Trivial - Lightweight and easy-to-use CMS. ( the custom version based on soycms. )

SoyCMS Trivial Author arbk (https://aruo.net/) Licensed under the GPLv2 license Version 3.1.3-t0 DESCRIPTION SoyCMS Trivial is an open source web cont

arbk 1 Oct 18, 2021
Kirby: the CMS that adapts to any project, loved by developers and editors alike.

Kirby: the CMS that adapts to any project, loved by developers and editors alike. The Starterkit is a full-blown Kirby installation with a lot of exam

Kirby 151 Dec 23, 2022
Baicloud CMS is a lightweight content management system (CMS) based on PHP and MySQL and running on Linux, windows and other platforms

BaiCloud-cms About BaiCloud-cms is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the

null 5 Aug 15, 2022
GetSimple CMS - a flatfile CMS that works fast and efficient and has the best UI around, it is written in PHP

GetSimple CMS is a flatfile CMS that works fast and efficient and has the best UI around, it is written in PHP.

null 370 Dec 30, 2022
Bootstrap CMS - PHP CMS powered by Laravel 5 and Sentry

Bootstrap CMS Bootstrap CMS was created by, and is maintained by Graham Campbell, and is a PHP CMS powered by Laravel 5.1 and Sentry. It utilises many

Bootstrap CMS 2.5k Dec 27, 2022
Amila Laravel CMS - Free, open-source Simple Bootstrap Laravel CMS

Simple Bootstrap Laravel CMS. Support Laravel 8.x Can integrate into any existing Laravel project. Only add few database tables with prefixes, not affect your existing database tables. Support Laravel 7.x & Laravel 6.x & Laravel 5.x & MySql & PostgreSql - Amila Laravel CMS

Alex Zeng 96 Sep 6, 2022
Simple, modular content management system adapted for launch pages and one-page websites

Segmint Segmint is an easy-to-use flat-file landing page framework, allowing quick and efficient prototyping and deployment - perfect for freelancers

null 2 Jul 19, 2022
Flextype is an open-source Hybrid Content Management System with the freedom of a headless CMS and with the full functionality of a traditional CMS

Flextype is an open-source Hybrid Content Management System with the freedom of a headless CMS and with the full functionality of a traditional CMS. Building this Content Management System, we focused on simplicity. To achieve this, we implemented a simple but powerful API's.

Flextype 524 Dec 30, 2022
NukeViet 132 Nov 27, 2022