RevCMS is a Content Management System made for Developers and Non-Developers. Every content in a website can be managed by using raw code or WYSIWYG. RevCMS is a CMS that writes code for you.
RevCMS is just a package and just like any other package, you can add/remove it in your project anytime you want.
By registering custom admin menu you only need to create your own custom service provider (read more about laravel's service providers) and add it inside your config/app.php:
$ php artisan make:provider CustomMenuServiceProvider
Make sure to add it after RevCMS' Service Provider.
RevCMS\RevServiceProvider::class,
App\Providers\CustomMenuServiceProvider::class,
You can register Custom Admin Menu by using the following syntax inside your service provider's register method:
\RevCMS::router()
->register(array(
'uri' => '/custom-menu',
'uses' => 'CustomMenuController@index',
'title' => 'Menu 1',
'iconClass' => 'revicon-package',
'params' => array(
'middleware' => array(),
),
'children' => array(
array(
'uri' => '/custom-submenu-1',
'uses' => 'CustomMenuController@submenu1',
'title' => 'SubMenu 1',
'params' => array(),
),
),
));
- uri (Required) - Route URI.
- uses (Required) - Route's action.
- title (Required) - Menu title.
- params (Optional) - Other parameters for a route.
- children (Optional) - Submenu. Accepts the same arguments as the parent menu except the 'iconClass'.
You can now see your custom menu at the bottom part of the sidebar.
For the custom menu panel, you only need to create a new blade file and render it using RevCMS' dashboard module, by using the following syntax:
Inside CustomMenuController add the following code:
public function index()
{
return \RevCMS::dashboard()
->render('view', 'menu_bar_title', menu_order);
}
- view - Name of the view.
- menu_bar_title - Title to be displayed on the tab.
- menu_order - Order of the menu, starts at 1.
<div class="container-fluid">
<h1 class="text-center page-header">
Hello World!
<small>
This is our first custom menu.
</small>
</h1>
</div>
#--------------------------------------------------------
\RevCMS::cms()->admin()->register('App\Post');
...
...
...
The Laravel framework is open-sourced software licensed under the MIT license.