scalexy/laravel-tools

Tools for Laravel
2,959 1
Install
composer require scalexy/laravel-tools
Latest Version:v0.0.32
License:MIT
Last Updated:Oct 31, 2025
Links: GitHub  ·  Packagist
Maintainer: ScaleXY

Easebuzz Handler

Installation and usage

Install via composer

composer require scalexy/laravel-tools

Add to .env

Add to config/services.php

Why

We wanted it, we built it.

Opensource

We licensed under the MIT License so that anyone can use it. But we don't intend to actively develop it. You are free to fork it and continue development. PR(s) will probably be ignored.

Urgent help

If there is some small bug that you need fixed like adding a new param, open an issue and we'll look into it. Don't do it to request new features, we'll close it.

Security issues

If there are any security issues, please mail us security@scalexy.com

Features implemented

  • Traits

    • Autorun Functions
      • AddMissingUUIDOnCreating
      • AddMissingTOTPKeyOnCreating
      • HashPasswordOnCreating
      • HashPasswordOnUpdating
    • Exceptions
      • FormatExceptionAsJSONForAPI
  • Middlewares

    • FormatAPIResponse

Auto-run methods

Use the AutoRun attribute with AutoRunTrait to run a model method during an Eloquent lifecycle event. Methods can be public, protected, or private, and may accept the model instance as an optional argument.

use ScaleXY\Tools\Attributes\AutoRun;
use ScaleXY\Tools\Traits\AutoRunTrait;

class User extends Model
{
    use AutoRunTrait;

    #[AutoRun('creating')]
    protected function setDefaults(): void
    {
        // ...
    }

    #[AutoRun('updating', 'updated')]
    protected function syncSearchIndex($user): void
    {
        // ...
    }
}

Supported events are creating, created, updating, updated, deleting, and deleted. The mutating alias runs for all *ing events, while mutated runs for all *ed events.

Related Packages

gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

631,580,251 9,707
laravel/framework

The Laravel Framework.

580,311,802 34,925
laravel/tinker

Powerful REPL for the Laravel framework.

489,754,436 7,444