scalexy/laravel-tools

Tools for Laravel
3,182 1
Install
composer require scalexy/laravel-tools
Latest Version:v0.1.0
License:MIT
Last Updated:Sep 22, 2026
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

doctrine/dbal

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

641,106,524 9,700
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

418,291,778 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

394,964,158 4,660

Version History

Version Released License
v0.1.0 MIT
v0.0.33 MIT
v0.0.32 MIT
v0.0.31 MIT
v0.0.30 MIT