Download the PHP package tashkar18/notification without Composer
On this page you can find all versions of the php package tashkar18/notification. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tashkar18/notification
More information about tashkar18/notification
Files in tashkar18/notification
Package notification
Short Description Simple Notification System for Laravel 4.2
License
Informations about the package notification
Notification (Laravel 4)
Quick Start
Required Setup
Require tashkar18\notification
with the composer command
In your config/app.php
file,
add Tashkar18\Notification\NotificationServiceProvider
to the end of the providers
array
Now generate the configuration file
Then migrate the notifications
table
Setup
In any of your Eloquent
models, implement the NotificationInterface
and use the NotificationTrait
.
Then implement these methods in your model.
You can add the NoterTrait
to the your User
model to setup the user hasMany
relationship
You will then be able to access user notifications
Configuration
Create your Notification
-specific views folder, and adjust the packages/tashkar18/notification/config.php
to match
Create your ViewPresenter
for your Eloquent
model.
Your view presenter file is simply a view
file that will present your notification in human readable text.
For example, a Comment model would have a view file in views\notifications\comment.blade.php
The comment
object will automatically be passed into that view and can be access with the variable $comment
.
Testing (coming soon)
All versions of notification with dependencies
illuminate/support Version 4.2.*
illuminate/database Version 4.2.*
illuminate/view Version 4.2.*