How to add new admin menu for new plugin?

  • Open /plugins/<your-plugin>/src/Providers/<YourPlugin>ServiceProvider.php. Add below code to function boot
\Event::listen(SessionStarted::class, function () {
    dashboard_menu()->registerItem([
        'id' => 'cms-plugins-<your-plugin>', // key of menu, it should unique
        'priority' => 5,
        'parent_id' => null,
        'name' => __('Your plugin name'), // menu name, if you don't need translation, you can use the name in plain text
        'icon' => 'fa fa-camera',
        'url' => route('<plugins>.list'), // route to your plugin list.
        'permissions' => ['<plugins>.list'], // permission should same with route name, you can see that flag in Plugin.php
    ]);
});

How to add new language to admin panel?

How to add new post format

  • Add below code to your themes /functions/functions.php
register_post_format([
    'post-format-key' => [
        'key' => 'post-format-key',
        'name' => 'Post Format Name',
    ],
]);

How to share data between theme's views?

You can use Theme::set() and Theme::get() for partials views (using Theme::partial('...')).

Example: In public/themes/ripple/views/post.blade.php you can add bellow code to share $post data.

@php
    Theme::set('current_post', $post);
@endphp

And if you want to use it in public/themes/ripple/partials/header.blade.php.

@php
    $current_post = Theme::get('current_post');
@endphp

You can pass data like normal if you're using @include.

Example:

@include('theme.ripple::partials.header', ['current_post' => $post])