Reward Loyaltyドキュメント


Need guidance on updating the script? Refer to our upgrade instructions.

Version 2.1.0 - 2024-06-20

  • Refactor RouteServiceProvider and bootstrap files for Laravel 11 best practices
  • Add RouteServiceProvider to ensure API routes are registered

Version 2.0.0 - 2024-06-12

Due to the drastic restructuring of Laravel 11 files and the nature of upgrading this script, it is not possible to do this backwards compatible.

Follow the steps here to upgrade to Reward Loyalty v2.

We are pleased to announce the release of Reward Loyalty version 2.0. This major update brings numerous enhancements, improvements, and new features to provide a better experience. Below is a comprehensive list of the changes and updates:

Core updates:

  • Updated to Laravel 11: Upgraded to Laravel version 11 for enhanced security and performance.
  • Library updates: All NPM and Composer libraries updated to latest versions.
  • Refactored libraries: Non-Laravel 11 compatible libraries rewritten and integrated.

New features:

User interface improvements:

  • Enhanced member UI: Improved member user interface for better usability.
  • Expired loyalty cards: Improved logic flow for handling expired loyalty cards.
  • Improved translations: Comprehensive review and enhancement of all translations, including English.

Technical enhancements:

  • Issue resolution: Fixed multiple minor issues for better stability.
  • Code refactoring: Refactored codebase for maintainability and readability.
  • HTML reformatting: Reformatted HTML for better structure.
  • Performance improvements: Optimized performance and speed.


  • Other improvements: Numerous other enhancements and updates to improve overall functionality and user experience.

We hope you enjoy the new features and improvements in Reward Loyalty 2.0. Thank you for your continued support! 🚀

Version 1.33.1 - 2024-05-04

  • Handle possible null values in card meta retrieval

Version 1.33.0 - 2024-05-03

  • Make rounding of points optional in loyalty card rules, enabling new earning strategies

Version 1.32.0 - 2024-03-13

  • Increase loyalty card currency digits to 7 for better currency compatibility
  • Add info box advising use of phone's camera for QR scanning issues
  • Update check icon to enhanced version
  • Update README for PHP version requirement to 8.2.0

Version 1.31.1 - 2024-02-12

  • Remove initial element handling in relation syncing
  • Add .gitignore for ezyang/htmlpurifier library

Version 1.31.0 - 2024-02-01

PHP 8.2 is required as of this update

  • Updated PHP dependencies to their latest versions
  • Updated JavaScript and CSS libraries to their latest versions
  • Added UUID-based IDs trait for testing latency issues
  • Update .htaccess to redirect /public/ URLs and clean up access paths

Version 1.30.0 - 2023-12-12

  • Add expiration date filter to active rewards queries
  • Integrate member transactions overview into admin dashboard

Version 1.29.0 - 2023-10-23

  • Updated JavaScript and CSS libraries to their latest versions
  • Add I18nMiddleware to API middleware for i18n support
  • API scheme reference update
  • Update 401 response refs for admin, member, and partner to UnauthenticatedResponse
  • Update getMemberBalance response format and corresponding OpenAPI doc

Version 1.28.0 - 2023-09-21

  • Major API documentation improvements
  • Refactor API docblocks and documentation for clarity and consistency

Version 1.27.0 - 2023-09-20

  • Update API documentation
  • Add API endpoints for admin to list, get, and update partners
  • Implement admin authentication functionalities in API
  • API add feature to update authorized partner details
  • Update API User is not active response message
  • Modify auth middleware to return Unauthorized message instead of redirect
  • Add hiddenForPublic attribute to Admin model
  • Extend check for available languages to prevent 500 error
  • Remove logout method from API middleware to prevent error
  • Set name for Identifier column in member export
  • Enhance Snowflake ID generation with concurrency handling and retry mechanism

Version 1.26.1 - 2023-09-13 (2)

  • Display expired/used transactions at member card
  • Fix backend reward balance check

Version 1.26.0 - 2023-09-13 (1)

  • Fixed reward claim issue when balance matches cost
  • Add bottom margin to mobile side navigation
  • Update admin, partner and staff auth controller to validate intended URL segment
  • Move form element tooltips outside labels for mobile compatibility
  • Refine rewards list styling
  • Add existence check for reward before processing transaction reversal
  • Built project assets using npm run build
  • Update readme

Version 1.25.0 - 2023-09-07

  • Refactor analytics and implement points reversal logic
  • Remove 'src' attribute from image to prevent ERR_UNKNOWN_URL_SCHEME when claiming reward

Version 1.24.0 - 2023-09-06

  • Add feature for partners to delete last transaction added by staff for a member
  • Add rel="nofollow" and target="_blank" to card contact buttons

Version 1.23.1 - 2023-09-05

  • Remove dot (.) from registration email to avoid password confusion
  • Remove console.log debug statements

Version 1.23.0 - 2023-09-04

  • Set Active or Deactivated for cards in analytics overview
  • Update translation files
  • Style tweaks for analytics and hide View on website link for inactive cards
  • Add Club label to analytics overview and make design tweaks
  • Update default loyalty card design colors and background image
  • Add default value option to DataService for new images

Version 1.22.3 - 2023-09-02 (2)

  • Improve analytics overview and details UI clarity
  • Fix missing Edit Card link in card analytics and tweak UI
  • Add icons to Icon Component

Version 1.22.2 - 2023-09-02 (1)

  • Analytics UI update

Version 1.22.1 - 2023-09-01 (4)

  • Ensure analytic dates are always interpreted in local time zone

Version 1.22.0 - 2023-09-01 (3)

  • Revamped Analytics: Enhanced charting, UI and data
  • Fix correct day of week mapping for SQLite in analytics functions
  • Added arrow icons to Icon Component
  • Handle non-existent file path in Reward getAspectRatio function

Version 1.21.1 - 2023-09-01 (2)

  • Fix correct day of week in analytics queries and remove array index remapping
  • Prevent modification of created_at when setting expires_at for adding points

Version 1.21.0 - 2023-09-01 (1)

  • Fix 500 errors caused by updated multi-select element
  • Update share button from Twitter to X
  • Make updated_by column optional in DataService and implement in user profiles

Version 1.20.0 - 2023-08-29 (2)

  • Updated NPM packages to the latest versions
  • Updated composer packages to the latest versions

Version 1.19.0 - 2023-08-29 (1)

  • Refactor database migrations
  • Add config option to toggle Snowflake IDs for a particular installation
  • Replace kra8/laravel-snowflake with custom snowflake trait

Version 1.18.2 - 2023-08-27 (3)

  • Optimized migrations and models to use small Snowflake IDs, preventing larger ID casting issues

Version 1.18.1 - 2023-08-27 (2)

  • Convert email to lowercase in ResetPasswordRequest

Version 1.18.0 - 2023-08-27 (1)

  • Convert email to lowercase in RegistrationRequest and LoginRequest
  • Convert email formatted columns to lowercase in DataDefinition
  • Implement HasShortflakePrimary for shorter URLs, optimized compatibility, and enhanced QR performance
  • Add SNOWFLAKE_EPOCH env variable during installation for fresher IDs
  • Fix incorrect staff dashboard link redirecting to partner dashboard

Version 1.17.0 - 2023-08-24

  • Compile and bundle assets with NPM
  • Add cookie consent feature for user preferences
  • Refactor analytics tracking with cookie consent integration
  • Add setting for auto-login link in registration email
  • Cast Snowflake ID to BIGINT for specific MariaDB builds compatibility
  • Refine required PHP extension names in installation steps
  • Fix typo in configuration file
  • Update demo dialog

Version 1.16.1 - 2023-08-21

  • Fix member and card filtering by correcting staff transaction queries
  • Fix member and transaction filtering by correcting partner and date range queries

Version 1.16.0 - 2023-08-18

  • Add API route, functionality and docs for adding points only
  • Update add purchase API function for compatibility with updated transaction service
  • Redirect undefined routes to the redir.locale route
  • Add Haitian gourde (HTG) entry to currencies table in iso-countries database

Version 1.15.0 - 2023-08-12

  • Updated composer packages to the latest versions
  • Updated NPM packages to the latest versions
  • Demo update

Version 1.14.2 - 2023-08-11

  • Optimize camera selection for QR scanner across devices
  • Fix duplicated mime type in validation message
  • Layout margin correction

Version 1.14.1 - 2023-08-03

  • Fix null value for points when staff adds a purchase

Version 1.14.0 - 2023-08-03

  • Implement feature to add points without associating a purchase amount
  • Add right top QR button in staff dashboard for mobile devices
  • Add initial bonus points to analytics
  • Fix timezone issue affecting visibility of new cards with default issue date
  • Fix broken image in image upload selector on form validation error
  • Implement CSS focus ring for language dropdown across all layouts
  • Add margin for account dropdown in member layout
  • Update readme

Version 1.13.0 - 2023-08-01

  • Implement JavaScript QR code scanner in staff dashboard
  • Automatically add General club on new partner creation for better flow
  • Add post-insert callback feature to Data Definition

Version 1.12.0 - 2023-07-19

  • Implement one-time consumable signed URLs for reward claim links
  • Enhanced user authentication logic in I18nMiddleware so time zone is retrieved from appropriate user
  • Removed redundant I18nMiddleware from middleware to optimize performance

Version 1.11.0 - 2023-07-15

  • Update API documentation
  • Implement card logo functionality
  • Implement member logout functionality in API
  • Implement partner logout functionality in API
  • Add API endpoint for retrieving partner data
  • Unified formatting in TailwindCSS configuration
  • Reorganized environment variables and added group comments

Version 1.10.0 - 2023-07-14

  • Updated money formatting functions to support multiple currencies
  • Update API documentation
  • Add hiddenForPublic attribute to Staff model
  • Update OpenAPI schema for validation responses
  • Add balance field to card-related responses
  • Implement API endpoint for retrieving logged-in member data
  • Implement API logic for processing purchase transactions
  • Implement API endpoint to get member balance for a card

Version 1.9.0 - 2023-07-12

  • Extend queries to only return API responses with active items
  • Extend Partner API with Staff-related endpoints
  • Remove unused code block
  • Add hiddenForPublic attribute to Staff model
  • Define OpenAPI schema for StaffMember model
  • Create API routes for Staff functionalities
  • Add demo server to OpenAPI Server definitions
  • Add API routes and controller for partner clubs
  • Add new and fix existing OpenAPI schemas
  • Add hiddenForPublic attribute to Club model
  • Improve readability and maintainability of API Card controllers
  • Implement member registration feature in API
  • Refactor locale assignment in request handling for API routes

Version 1.8.0 - 2023-07-10

  • Updated NPM packages to the latest versions
  • Updated composer packages to the latest versions
  • Add check for PHP intl extension in redirectToLocale function
  • Add member controllers for authentication and card functions
  • Add option to hide columns to CardService
  • Add OpenAPI API documentation
  • Implement API authentication middleware for members
  • Implement API authentication and card routes for members
  • Implement API routes for retrieving partner's cards
  • Implement API authentication routes for partners
  • Implement and configure OpenAPI specifications
  • Implement API authentication middleware
  • Introduce columns hidden for public property
  • Cast ids as strings to circumvent JS max integer issue in API json responses
  • Resolve card ownership verification issue
  • Add missing column to personal_access_tokens table for Sanctum
  • Exclude API routes from CSRF verification
  • Add API guards to auth config

Version 1.7.0 - 2023-07-05

  • Implemented UI-based database migrations for admins
  • Add hreflang attribute to language selection for SEO enhancement
  • Update table used for unique email validation
  • Add 'Points redeemed' feature to analytics
  • Update readme with database update instructions

Version 1.6.2 - 2023-07-04

  • Remove lengthy URL subcopy from email to improve compatibility
  • Remove redundant space
  • Fix typo in member dashboard route

Version 1.6.1 - 2023-06-23 (2)

  • Updated SQL query for MariaDB to handle JSON column extraction correctly
  • Redirect users to active language if requested language is inactive
  • Update readme

Version 1.6.0 - 2023-06-23 (1)

  • Add contact data (website, route, phone) to loyalty cards management and UI
  • Fixed auth guard for staff impersonation in partner dashboard

Version 1.5.0 - 2023-06-22

  • Implemented option (for admins) to disable the feature for partners to show cards on the homepage
  • Fixed issue where related items that required ownership were not queried correctly, causing items to show for wrong users
  • Added DataDefinition feature to save to json columns casted as array
  • Fixed timezone function where wrong key led to validation issues
  • Remove redundant locale config, switch to app.locale

Version 1.4.0 - 2023-06-21

  • Add French translation
  • Optimize card query: Remove manual expiration filter, enhance performance
  • Implement custom not-found messages for cards and rewards instead of generic 404 response
  • Set default language to first found language when no current language is available

Version 1.3.0 - 2023-06-20

  • Updated CSS for improved handling of long card titles and QR code placement
  • Refactored language activation configuration to a separate file (link)
  • Removed language name in parentheses for single active language setup
  • Added country code fields to forms
  • Set English US as the default active language post-installation

Version 1.2.1 - 2023-06-19 (2)

  • Implement default timezone fallback for browsers
  • Remove IANA-only timezone validation rule

Version 1.2.0 - 2023-06-19 (1)

  • Updated NPM packages to the latest versions
  • Updated composer packages to the latest versions
  • Added German language
  • Fixed incorrect default value causing improper locale redirect
  • Improved redirect mechanism in LocaleController

Version 1.1.2 - 2023-06-18

  • Move local date time formatter to view to avoid errors
  • Handle case of user not found in DataDefinition view mode

Version 1.1.1 - 2023-06-17

  • Resolve missing from input error in member registration

Version 1.1.0 - 2023-06-16

  • Introduce query type to DataDefinitions and add Loyalty card count to admin partners list
  • Extend input sanitizer to handle array-based input
  • Fix issue with handling empty many-to-many relationships

Version 1.0.7 - 2023-06-14

  • Add fix for 'Specified key was too long' error
  • Update installation requirements check

Version 1.0.6 - 2023-06-13

  • Removed optional PHP extension requirements

Version 1.0.5 - 2023-06-12

  • Included Inter font locally, removing CDN dependency
  • Allowed null values in timestamp columns for optimal compatibility

Version 1.0.4 - 2023-06-11

  • Added HTMLPurifier for user input sanitization
  • Removed unused files

Version 1.0.3 - 2023-06-10

  • Implement white label logo/text functionality
  • Enhanced installation process with optimized default values and added configuration option for dark theme logo
  • Remove unused database tables

Version 1.0.2 - 2023-06-09

  • Composer update
  • NPM update packages
  • Database structure preparations
  • Updated readme
  • Added missing installation translation

Version 1.0.1 - 2023-06-08

  • Improved reward images visibility on small screens
  • Improved Partner seeder
  • Added FAQ translations
  • NPM update
  • Implemented Markdown translations for content pages
  • Open terms and privacy links on registration page in new window
  • Removed redundant viewport meta tag
  • Remove unused Blade component
  • Remove unused images
  • Enable autofill for Partner and Staff login form upon registration email
  • Update blade Form Input component to display value for password fields
  • Update RedirectIfAuthenticated for guard-specific dashboard redirection
  • Improve member registration with redirect functionality
  • Corrected 'reviews' table foreign key reference from 'club' to 'clubs'
  • Removed wrong help text
  • Added management for all registered members
  • After logging in for the first time, redirect to dashboard instead of homepage
  • Replaced 'member' with user name on dashboard
  • Fixed use of wrong guard when verifying authentication
  • Prevent ERR_UNKNOWN_URL_SCHEME error by replacing about:blank with empty data URI
  • Remove unused includes causing error
  • Added missing translations
  • Improved demo login message UI and content
  • Improved error pages layout and content
  • Improve redirection after login with intended URLs
  • Add session migration
  • Enhance visibility of QR view button for loyalty cards
  • Minor updates and tweaks for improved user experience
  • Correct capitalization error

Version 1.0.0 - 2023-06-02

  • Init commit