Wallogit.com
2017 © Pedro Peláez
A partial CMS created for Laravel
A partial page management package created for Laravel, (*1)
Run composer require yeoji/parsh-cms in your application directory, (*2)
Or add the following line to your composer.json file:, (*3)
"require": {
"yeoji/parsh-cms": "dev-master"
}
In your application's app/config/app.php file:, (*4)
Add this line to the service providers array:, (*5)
Yeoji\ParshCMS\Providers\ParshServiceProvider::class
Run the following command to publish the migrations and public files., (*6)
php artisan vendor:publish --provider="Yeoji\ParshCMS\Providers\ParshServiceProvider", (*7)
When you upload a theme template file, make sure it is in blade syntax and contain the following:, (*8)
<title>@yield('title')</title> - For the page's title, (*9)
@yield('content') - For where the content should be rendered, (*10)
@include('parshcms::custom.navigation') - For the navigation bar, (*11)
There should be no other blade syntax as this should be a static page., (*12)
All styles should be in your application's public folder, or on a CDN., (*13)
The navigation bar is automatically generated for each page that has been created., (*14)
In order to change this, create the file vendor/parshcms/custom/navigation.blade.php under your application's resources/views directory., (*15)
The default navigation is a simple:, (*16)
@foreach($pages->all() as $page)
<li><a href="/{{ $page->key }}">{{$page->title}}</a></li>
@endforeach
In your newly created custom/navigation.blade.php file, you are free to do whatever you want your navigation bar to be., (*17)
For any other custom views, the same steps apply. Just mirror the directories/files in the package's views in order to override the views., (*18)