PHP code example of wsmallnews / cms
1. Go to this page and download the library: Download wsmallnews/cms library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wsmallnews / cms example snippets
return [
'scopeable' => [
'scope_type' => 'sn-cms',
'scope_id' => 0,
],
'models' => [
'navigation' => Wsmallnews\Cms\Models\Navigation::class,
'navigation_type' => Wsmallnews\Cms\Models\NavigationType::class,
'post' => Wsmallnews\Cms\Models\Post::class,
],
'routes' => [
'enabled' => true,
'prefix' => 'cms',
'name' => 'sn-cms.',
],
];
use Wsmallnews\Cms\CmsPlugin;
$panel
->plugin(CmsPlugin::make());
namespace App\Filament\Pages;
use Wsmallnews\Cms\Filament\Pages\Navigation\Base;
class FooterNavigation extends Base
{
protected static ?string $slug = 'footer-navigation';
protected static ?string $scopeType = 'footer';
protected static int $scopeId = 0;
protected static ?int $level = 2;
}
bash
php artisan boost:update --discover
bash
php artisan sn-cms:install
bash
php artisan sn-cms:install --no-deps --no-interaction
bash
php artisan vendor:publish --tag="cms-config"
bash
php artisan vendor:publish --tag="cms-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="sn-support-translations"
bash
php artisan vendor:publish --tag="cms-views"