bakkerij / notifier Goto Github PK
View Code? Open in Web Editor NEWNotifications plugin for CakePHP 3.x
License: MIT License
Notifications plugin for CakePHP 3.x
License: MIT License
Here is my code -
dump($this->Notifier->allNotificationList($userid, true));
got Error :
Error: Call to undefined method Notifier\Controller\Component\NotifierComponent::allNotificationList()
File /Users/adityagupta/talkadoc/vendor/cakedc/users/src/Controller/UsersController.php
Line: 70
Hello, I am new in CakePHP.
Here is my code -
// bootstrap.php
`use Notifier\Utility\NotificationManager;
Plugin::load('Migrations');
Plugin::load('Notifier', ['bootstrap' => true, 'routes' => true, 'autoload' => true]);
$notificationManager = new NotificationManager();
$notificationManager->addTemplate('add', [
'title' => 'New blog by :username',
'body' => ':username has posted a new blog named :name'
]);`
// BookmarksController.php
`public function index()
{
$this->paginate = [
'contain' => ['Users', 'Tags']
];
$bookmarks = $this->paginate($this->Bookmarks);
$this->Notifier->notify([
'users' => [1],
'template' => 'add',
'vars' => [
'username' => 'Aditya',
'name' => 'My great new blogpost'
],
]);
public function add() {....}`
I am not seeing any notification.
I don't understand how to use this plugin?
Please describe in details.
Thank You
when i install that composer package according the docs rule and then i run it on localhost as localhost/mann/notifications then it gives me error here could not found NotificationsController.
?which type of that issue.please help me
Hi! Thanks for the amazing work.
I have suggestion. Would it be better to handle templates in config files instead?
It would allow an easier integration process.
A config file would allow a few more improvements for he plugin such as
instead of doing this:
`$this->Notifier->allNotificationList(2, true);``
We could use config to set env var (or similar) to do this:
$this->Notifier->allNotificationList(2, __UNREAD__);
What do you think? Tell me if you need a PR on this one.
Can the packagelist page for the plugin be updated as the old version is still in place so composer is still pulling the older version of this application and causing errors with cakePHP
https://packagist.org/packages/bakkerij/notifier
Thanks for any help.
As you know keeping controllers clean and implementing the data related logic into model level is a better approach for CakePHP in a few different ways.
So, since the notifications are created with templates, I often find myself using variables from my entity just after saving it. For example; I want to notify all users when I add a new record to my posts. So I suggest thinking about something like below:
$this->addBehavior('bakkerij/notifier.notifier', [
'template' => 'someTemplateName',
'keywords' => [
'keyword1' => 'columnNameOne',
'keyword2' => 'columnNameTwo',
],
'to' => 'recipentListName?'
]);
Can not install the plugin:
php composer.phar create-project --prefer-dist cakephp/app cakeadmintestapp
cd cakeadmintestapp
php ../composer.phar require cakeplugins/notifier
bin/cake plugin install -b Notifier
fails: Error: Unknown short option b
If I use the load plugin it works:
bin/cake plugin load Notifier
But the next step fails:
bin/cake migrations migrate Notifier
Exception: Plugin Notifier could not be found. in [/var/www/vhosts/workspace_us/htdocs/cakeadmintestapp/vendor/cakephp/cakephp/src/Core/Plugin.php, line 148]
Please, Can you update for CakePHP 3.6
As I can see the last commit f913660 was 6 years ago.
If the plugin is no longer being maintained, could you suggest any alternatives or forks? Additionally, if there's a way for the community to assist or take over maintenance, please let us know.
In CakeMojo we are doing some updates (I have had to update it for a Open Source project). I guess that everyone is working in this plugin by yourself in your own fork and you have some ideas to improve this plugin, please don't hesitate to suggest them and collaborate.
Hi !
Thank you for your plugin.
I would like use this plugin on CakePHP 3.1.x and i have this error when trying to get the number of notification :
Error: Call to undefined method Notifier\Utility\NotificationManager::countsNotifications()
I think the NotifierComponent don't load with the plugin.
Thank you for your answer.
(i'm using CakeDC/Users for User system and user_id is not in INT but in CHAR(36))
Suggestion; implement kind of 'adapters' which are able took hook into notifications. Can be useful to connect to 3rd parties. This idea was brought internally and by #20.
Some ideas of adapters:
(the idea of adapters can be seen like http://flysystem.thephpleague.com/)
If you want to join the realization of this implementation, feel free to hang into this issue!
Some points of discussion:
cake bake
command for adapters would be cute :)Adapter
class?The description for the release of 1.0 (https://github.com/cakemanager/cakephp-notifier/releases/tag/1.0.0) mentions
The CakePHP core team is happy to announce...
Please remove this, since the CakePHP core team has nothing to do with this plugin! :) Also, maybe tag a new point release?
Do you see any issue in updating the composer.json to allow for cake 3.6.*?
Need help
I would like to merge your notifier with this plugin Full Calender
https://github.com/curtisblack2004/CakePHP-Full-Calendar-Plugin
For exemple a User created some Event then I wanna notify the User (create alert) by Email
How do I do that !
Maybe the plugin composer.json could be updated to be compatible with latest cakephp versión?
The readme is missing some important information, like an introductory sentence saying something like "This ... helps to ... " to explain to people what this plugin is for, and why they should use it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.