2017 © Pedro Peláez
 

library cscms

Coder Studios CMS package

image

coderstudios/cscms

Coder Studios CMS package

  • Tuesday, July 10, 2018
  • by ritey
  • Repository
  • 1 Watchers
  • 0 Stars
  • 131 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 1 % Grown

The README.md

CsCms

CsCms is a CMS package in PHP for use with a Laravel project., (*1)

Latest Stable Version Total Downloads Latest Unstable Version License, (*2)

Composer

To install CsCms as a Composer package to be used with Laravel 5+, simply add this to your composer.json:, (*3)

"coderstudios/cscms": "1.0.*"

..and run composer update., (*4)

Edit App\Exceptions\Handler.php, (*5)

..add the use statement, (*6)

Illuminate\Auth\AuthenticationException;

and override the unauthenticated default function with the following, (*7)


/** * Convert an authentication exception into a response. * * @param \Illuminate\Http\Request $request * @param \Illuminate\Auth\AuthenticationException $exception * @return \Illuminate\Http\Response */ protected function unauthenticated($request, AuthenticationException $exception) { $path = route('frontend.login'); if ($request->is('admin/*') || $request->is('admin')) { $path = route('backend.login'); } return $request->expectsJson() ? response()->json(['message' => $exception->getMessage()], 401) : redirect()->guest($path); }

Update auth.php replace providers array with config:, (*8)

    'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => CoderStudios\CsCms\Models\User::class,
        ],

On a fresh install of laravel run:, (*9)

  1. php artisan vendor:publish --provider="CoderStudios\CsCms\CsCmsServiceProvider"
  2. php artisan migrate
  3. php artisan cscms:install

If you are developing your own theme, ensure you add the view composer relevant to your theme in the AppServiceProvider.php boot method, (*10)

    view()->composer(config('CsCms.coderstudios.theme').'.layouts.master','CoderStudios\CsCms\Composers\Frontend\MasterComposer');

Documentation

Once the package is installed you can add, (*11)

    "@php artisan cscms:update"

to your composer.json so that on package update, any cached data or views get cleared automatically to account for any new package updates, (*12)

Example update composer.json file, (*13)

    "@php artisan package:discover",
    "@php artisan cscms:update"

Updating

Assets

php artisan vendor:publish --provider="CoderStudios\CsCms\CsCmsServiceProvider", (*14)

php artisan vendor:publish --tag=public --force, (*15)

php artisan vendor:publish --tag=resource --force, (*16)

php artisan vendor:publish --tag=config --force, (*17)

php artisan vendor:publish --tag=views --force, (*18)

php artisan vendor:publish --tag=migrations --force, (*19)

php artisan vendor:publish --tag=lang --force, (*20)

CsCms has been written by Coder Studios and is released under the MIT License., (*21)

The Versions

10/07 2018

dev-master

9999999-dev

Coder Studios CMS package

  Sources   Download

MIT

The Requires

 

The Development Requires

by Coder Studios

laravel cms coderstudios