New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

spekulatius/laravel-powertools

A personal collection of Laravel Helpers, my powertools.
1,094 3

Larablocks Analysis

spekulatius/laravel-powertools works with Laravel 8, 9 and 10 (latest release 0.3.2, Aug 7, 2023), all past end of life (the last on Feb 4, 2025): no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 8, 9 and 10, past end of life since Feb 4, 2025
  • No release in the last 12 months (last: Aug 7, 2023)
  • 0 downloads a month (needs 10,000)
  • 3 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Aug 7, 2023.
  • No releases in the last 12 months.
  • First released: Mar 27, 2023.
  • 1 open issue on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.

Install
composer require spekulatius/laravel-powertools
Latest Version:0.3.2
PHP:^8.1
Laravel:8 · 9 · 10
License:MIT
Last Updated:Aug 7, 2023
Links: GitHub  ·  Packagist
Maintainer: spekulatius

A personal collection of Laravel Helpers, my powertools.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is a personal collection of handy helpers, tools, and utilities that I've used across various Laravel projects. However, please note that these are intended for personal use and development, so please use at your own risk.

Features

maskSensitiveData: Collection Makro to mask sensitive data

maskSensitiveData Laravel Collection macro and provides the functionality to mask sensitive data in a collection. The macro prepares masked fields regular expressions for use, and applies the mask to the sensitive data based on the regexes and custom fields. It maps over the collection and replaces any data matching the regular expressions with a mask value of [masked]. This functionality is useful when dealing with collections of sensitive data and is designed to keep the sensitive data secure.

Usage:

collect(['password' => 'this really should not be logged...'])
  ->maskSensitiveData()
  ->toArray();

// 'password' => '[masked]'

ToLog: Model Trait to log context

The ToLog trait is a simple trait to add to models that allows you to summarize model data as logging context. It's essentially a slimmed-down version of the ->toArray() method, and it's meant to be used in a similar approach similar to \Log::error('....', $entry->toLog());. Already runs maskSensitiveData by design.

SelfDeletingTemporaryDirectory

An extension of Spaties TemporaryDirectory to delete itself after 120 minutes (configurable).

use Spekulatius\LaravelPowertools\Helpers\SelfDeletingTemporaryDirectory;

// ...

$tempDir = new SelfDeletingTemporaryDirectory;

// use like TemporaryDirectory from Spatie.

My common way to use this:

$tempFile = (new SelfDeletingTemporaryDirectory)->create()->path('temp.zip');

Compatibility

This project has been tested on Laravel 10 using PHP 8.1 or 8.2. It should work on Laravel 9 as well, although it has not been tested on that version.

Installation

You can install the package via composer:

composer require spekulatius/laravel-powertools

You can publish the config file with:

php artisan vendor:publish --tag="laravel-powertools-config"

Testing

The project is roughly tested on Laravel 10.

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

doctrine/dbal

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

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

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

465,816,364 607
nunomaduro/collision

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

431,187,642 4,660

Version History

Version Released PHP Laravel License
0.3.2 ^8.1 ^8.0|^9.28|^10.0 MIT
0.3.1 ^8.1 ^8.0|^9.28|^10.0 MIT
0.3.0 ^8.1 ^8.0|^9.28|^10.0 MIT
0.2.0 ^8.1 ^10.0 MIT
0.1.0 ^8.1 ^10.0 MIT