axazara/laravel-helpers

A Laravel Helpers suited for Laravel development at Axa Zara

dev-main 2023-08-20 01:10 UTC

This package is auto-updated.

Last update: 2024-11-20 05:16:32 UTC


README

Latest Stable Version Total Downloads License

This Laravel package provides a collection of Helpers functions to help you build your Laravel application. This is a collection of functions that are commonly used in Axa Zara Laravel projects.

Requirements

Laravel 8.0 or higher

Installation

You can install the package via composer:

composer require axazara/laravel-helpers

Usage

List of available helpers functions:

FunctionDescription
arrayGetGet an item from an array using "dot" notation.
addQueryParamsToUrlAdd query parameters to the given URL.
arrayPluckPluck an array of values from an array.
deleteFileDelete file from storage.
generateAvatarUrlGenerate avatar url.
getLanguageCodeGet language code from locale.
getNanoIdGenerate a Nano ID.
paginationArrayPaginate array from a collection.
storeFileStore file in storage.
stripeContentStripe content from array.
twoFactorGet two factor auth instance.
makeClickableLinksMake clickable links from text.

Development

  • Add new helper function in src/Helpers directory
  • Add new test in tests/Helpers directory format : HelperNameTest.php
  • Run composer test to run the test suite.
  • Run composer sniff to run the code style check.
  • Run composer format to run the code style fixer.

Get Composer. For example, on Mac OS:

brew install composer

Install dependencies:

composer install

The library uses PHP CS Fixer for code formatting. Code must be formatted before PRs are submitted, otherwise CI will fail. Run the formatter with:

./vendor/bin/php-cs-fixer fix -v .

Security Vulnerabilities

If you discover a security vulnerability within Moneroo Laravel SDK, please send an e-mail to Moneroo Security via hello@axazara.com. All security vulnerabilities will be promptly addressed.

License

The Moneroo Laravel SDK is open-sourced software licensed under the MIT license.