Skip to content

Removed the namespace in database notification types in Laravel.

Notifications You must be signed in to change notification settings

einnar82/custom-database-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Custom Database Driver For Laravel

Simplified the notification type of Laravel Database Notifications.

Before:

 { "type":"App\\Notifications\\API\\v1\\Vehicles\\VehicleDeletedNotification",

After:

{	"type": "VehicleDeletedNotification",

Installation:

In your terminal type,

$ composer require einnar82/custom-database-driver

Then, change your notification class driver into,

use RannieOllit\CustomDatabaseDriver\CustomDatabaseChannel;    

/**
    * Get the notification's delivery channels.
    *
    * @param mixed $notifiable
    * @return array
    */

public  function  via($notifiable)
{
    return  [CustomDatabaseChannel::class];
}

About

Removed the namespace in database notification types in Laravel.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages