Download the PHP package rmscms/helper without Composer
On this page you can find all versions of the php package rmscms/helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rmscms/helper
More information about rmscms/helper
Files in rmscms/helper
Package helper
Short Description A helper package for Laravel applications
License MIT
Informations about the package helper
RMS Helper Package for Laravel
A powerful utility package for Laravel applications, providing helper functions for Persian date handling, web services (REST and SOAP), Eloquent model scopes, and Excel import/export.
Installation
-
Install via Composer:
-
Add the service provider to
config/app.php(optional, auto-discovered in Laravel): - Publish the configuration file:
Configuration
The package includes a configuration file at config/helpers.php:
Features
1. Date Helper Functions
Handle Persian (Jalali) and Gregorian dates with ease.
-
persian_date($date, $format = 'Y/m/d H:i:s'): Format a date as Persian. -
gregorian_date($date, $separator = '/'): Convert Persian date to Gregorian. -
persian_to_timestamp($date, $separator = '/'): Convert Persian date to Unix timestamp. -
is_valid_persian_date($date, $separator = '/'): Validate Persian date. -
persian_date_diff($startDate, $endDate, $separator = '/'): Calculate days between two Persian dates. persian_now($format = 'Y/m/d H:i:s'): Get current Persian date.
2. Number and Currency Helpers
Format numbers and convert Persian/Arabic digits.
-
displayAmount($amount, $sign = null): Format amount with currency. changeNumberToEn($string): Convert Persian/Arabic numbers to English.
3. Eloquent Model Scopes
Enhance Eloquent models with useful scopes via ModelTrait.
-
active(): Filter active records. -
countAndSum($column = 'amount'): Get count and sum of a column. -
today(): Filter records created today. -
yesterday(): Filter records created yesterday. -
whereLike($column, $value): Search column with LIKE. -
orderByLatest(): Order by latestcreated_at. -
whereInDateRange($start, $end, $column = 'created_at'): Filter records in date range. -
withTrashed(): Include soft-deleted records. whereStatus($status, $column = 'status'): Filter by status.
4. Web Services
Handle REST and SOAP web services.
REST Web Service
SOAP Web Service
5. Excel Import/Export
Simplify Excel operations with ExcelHelper.
Testing
Run tests to ensure functionality:
Requirements
- PHP ^8.1
- Laravel ^12.0
guzzlehttp/guzzle^7.0morilog/jalali^3.0maatwebsite/excel^3.1
License
MIT License. See LICENSE for details.
All versions of helper with dependencies
illuminate/support Version ^12.0
guzzlehttp/guzzle Version ^7.0
morilog/jalali Version ^3.0
watson/aggregate Version 5.*
maatwebsite/excel Version 3.1.*