dev-master
9999999-devCoder Studios CMS package
MIT
The Requires
- php >=5.4.0
- illuminate/support ~5.4
The Development Requires
by Coder Studios
laravel cms coderstudios
Coder Studios CMS package
CsCms is a CMS package in PHP for use with a Laravel project., (*1)
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)
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');
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"
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)
Coder Studios CMS package
MIT
laravel cms coderstudios