Download the PHP package williamcruzme/laravel-notification-settings without Composer

On this page you can find all versions of the php package williamcruzme/laravel-notification-settings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-notification-settings

Laravel Notification Settings

Laravel Laravel GitHub


laravel-notification-settings is a Laravel package that allows you to check the notification settings before send them.

💿 Installation

🏁 Getting Started

1. Adding trait

In your user model add the Notifiable trait. This trait supports custom guards:

2. Running migrations

Sometimes you may need to customize the migrations. Using the vendor:publish command you can export the migrations:

3. Creating seeder

Add all notifications that require settings. Notification that are not added will be sent without verification:

4. Adding routes

Using the Notification facade to import the routes for manage the settings:

🚀 Usage

Using The Notifiable Trait

This trait contains one method that may be used to send notifications: notify. The notify method check if the user wants to receive it, and expects to receive a notification instance:

Using The Notification Facade

Alternatively, you may send notifications via the Notification facade. This is useful primarily when you need to send a notification to multiple notifiable entities such as a collection of users. To send notifications using the facade, pass all of the notifiable entities and the notification instance to the send method:

🌐 Routes

Get notifications

Method URI
GET /notifications

Mark as read

Method URI
PATCH /notifications/read

Delete notification

Method URI
DELETE /notifications/{notificationId}

Get notification settings

Method URI
GET /settings/notifications

Update notification setting

Method URI
PATCH /settings/notifications/{notificationTypeId}

Body Params

🎨 Customizing

First of all, create your own NotificationSettingController controllers and add the ManageNotificationSettings trait.

Second, modify the namespace of the Notification facade routes:

Custom request validations

The rules validationErrorMessages methods in the NotificationSettingController allows you override the default request validations:

Custom response

The sendResponse method in the NotificationSettingController allows you override the default response:

Custom guards

The guard method in the NotificationSettingController allows you override the default guard:

🚸 Contributing

You are welcome to contribute to this project, but before you do, please make sure you read the contribution guide.

🔒 License

MIT


All versions of laravel-notification-settings with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package williamcruzme/laravel-notification-settings contains the following files

Loading the files please wait ....