2017-25 © Pedro Peláez
 

library laravel-cms-base

Minimalist CMS for Laravel

image

vvvkor/laravel-cms-base

Minimalist CMS for Laravel

  • Thursday, July 19, 2018
  • by vvvkor
  • Repository
  • 0 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

cms

Minimalist CMS for Laravel, (*1)

Features

  • Lightweight
  • Minimal footprint (just one additional table in database)
  • Manage users
  • Profile page
  • Manage pages ("sections") hierarchy (view as table or as nested list)
  • Public and protected pages (and attached files)
  • Publication can be planned for future
  • Many articles per page
  • Many uploads per article
  • Localizable (english and russian translations icluded)
  • Uses standard Laravel authentication
  • Ready to use WYSIWYG CKEditor
  • Cache pages
  • Image thumbnails (also cached)

Developer info

  • Uses two database tables: users extended from standard Laravel authentication and sections for pages, articles, files.
  • Database migrations included.
  • Cms facade and cms() helper function.
  • Repository of sections SectionRepository.
  • Policies for managing users and sections (UserPolicy, SectionPolicy).
  • Middleware: CheckUserRole and CachePages.
  • Thumbnails generated and cached with intervention/image.
  • Views marked up with bootstrap classes.

Install

In short: configure database then run:, (*2)

$ php artisan make:auth
$ composer require vvvkor/laravel-cms-base
$ php artisan migrate
$ php artisan make:cms

Configure database (if you have not alredy)

Set parameters in .env or config/database.php files of your project.
Depending on DBMS version (MySQL < 5.7.7.), you may need to fix string length ., (*3)

Enable authorization (if you have not alredy)

``` bash $ php artisan make:auth, (*4)


### Require CMS package ``` bash $ composer require vvvkor/laravel-cms-base

Add service provider (if auto-discovery is disabled)

In config/app.php add to providers section, (*5)

vvvkor\cms\cmsServiceProvider::class,

and to aliases section, (*6)

'Cms' => vvvkor\cms\Facades\Cms::class,

Migrate tables with default data

$ php artisan migrate

Add CMS routes

To add routes to routes/web.php run, (*7)

$ php artisan make:cms

or add manually to routes/web.php, (*8)

Cms::routes();

Publish views, translations, config (optional)

Copy stuff to your app if you want to modify it.
Views are marked with Bootstrap classes., (*9)

$ php artisan vendor:publish --provider=vvvkor\laravel-cms-base\CmsServiceProvider

Use WYSIWYG CKEditor (optional)

You can use CKEditor for visual formatting of texts., (*10)

$ composer require unisharp/laravel-ckeditor

In config/app.php add to providers section, (*11)

Unisharp\Ckeditor\ServiceProvider::class,

Publish assets, (*12)

$ php artisan vendor:publish --tag=ckeditor

Usage

  • Using browser go to home page of your project.
  • Log in as administrator with e-mail admin@domain.com and password admin.
  • Or as privileged reader with e-mail reader@domain.com and password reader.
  • Go to home page again.
  • For administrator, on top of page there are links to manage Sections and Users.
  • For reader, there is a link to a protected page in top menu.

The Versions

19/07 2018
16/05 2018
11/05 2018
08/05 2018
03/05 2018