Skip to content

snehalkadwe/daily-quotes-app

Repository files navigation

Daily Quotes Application

Example using NOVU notification channel

Clone the repository and run composer install command Run the following commands:

  php artisan breeze:install
  php artisan migrate
  npm install
  npm run dev

To make admin user run the seeder

php artisan db:seed

Install novu-laravel SDK using composer

composer require novu/novu-laravel

Configuration

You can publish the configuration file using this command:

php artisan vendor:publish --tag="novu-laravel-config"

A configuration file named novu is created in config directory

API Keys

Open your .env file and add your API Key.

NOVU_API_KEY=xxxxxxxxxxxxx

Note: Get your API from here Novu Dashboard.

Setup Workflow in Novu Dashboard

(Note: If you are not familiar with Novu and creation of workflows in Novu Dashboard please refer these blogs)

Required Workflow

  • Workflow 1: for subscribed user -- select only Email channel - provide all required details
  • Workflow 2: for admin -- select Email, SMS channels (used to notify admin of newly subscribed user)
  • Workflow 3: for subscribed user -- select Email channel (used to send daily quotes to the user's email address)

To get random quote we are using dummyjson.com, to make a request to dummyjson we are using Laravel's Http Client

To run command in local enviornment using job run this command

php artisan queue:work

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages