Skip to content

Features/customisable notification template #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MGMonge
Copy link

@MGMonge MGMonge commented Aug 22, 2019

Hi there,

I've been using your package on a project and saved me a lot of time so thank you very much for creating it 🎉. it helped me a lot. I made some minor changes to allow people to customise the default template as I needed it for my project.

Here is an example of how it works:

You can include a custom partial with a custom template to the nova layout

// file: resources/views/custom-nova-notification-feed.blade.php

<notification-feed>
    <template v-slot="{ notification }">
        <notification-message :notification="notification" inline-template>
            <a class="notification table mt-4 table-fixed w-full" :href="notification.data.url">
                <div class="table-cell w-full">
                    <p v-html="notification.data.message"></p>
                    <span class="text-sm text-70">@{{ notification.created_at | fromNow }}</span>
                </div>
            </a>
        </notification-message>
    </template>
</notification-feed>

I also added the example above on the README.md file

@MGMonge MGMonge mentioned this pull request Aug 22, 2019
@timcv
Copy link

timcv commented Dec 9, 2019

@chrisbjr Could you take a look on this? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants