Download the PHP package hdaklue/polish without Composer

On this page you can find all versions of the php package hdaklue/polish. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package polish

Polish

The Laravel package that transforms enterprise-level formatting chaos into elegant, centralized mastery

The Pain Every Laravel Developer Recognizes

Your product manager walks in with "small formatting changes" that trigger a nightmare across your entire application. Customer tier badges, order statuses, financial displays — what seems like simple updates becomes hunting down scattered logic across:

The real problem: Your sophisticated business formatting has no architectural home, so it spreads into an unmaintainable mess of duplicate code across every layer of your production application.

Your enterprise-grade Laravel application deserves enterprise-grade formatting architecture.

Table of Contents

The Solution: Give Your Formatting Logic a Proper Home

Polish provides a beautifully simple, static-first approach that Laravel developers actually want to use. Define your formatting rules once in clean "Polisher" classes, then use them everywhere without dependency injection, configuration files, or architectural complexity.

The magic moment: Change from 6 to 7 characters in your polisher class, and instantly watch every Filament column, Livewire component, Blade template, API response, notification, and DTO across your entire application reflect the change. One update, universal consistency, zero hunting.

Installation: Up and Running in 30 Seconds

Add Polish to your project with a single command:

That's literally it. Polish auto-registers with Laravel using package discovery, requires zero configuration, and you're immediately ready to create your first polisher. No config files to publish, no service providers to register, no setup complexity — just install and start polishing.

Basic Usage

Create Your First Polisher in 30 Seconds

Polish includes a delightful Artisan command that generates polisher boilerplate faster than you can think:

The command follows Laravel conventions perfectly — namespaced classes, PSR-4 autoloading, and clean directory structure. Everything you expect, nothing you don't.

Create Polishers Your Way

Or skip the command and extend BasePolisher directly for full control:

Use It Everywhere (This is Where the Magic Happens)

Now experience the pure satisfaction of watching the same polisher work flawlessly across your entire Laravel ecosystem:

The incredible result: One beautifully simple polisher class powering rock-solid consistent formatting across Filament tables, Livewire components, Blade views, API responses, background jobs, notifications, DTOs, and literally anywhere else you need data presentation in your Laravel application.

This is what "write once, use everywhere" actually feels like.

Built-in Polishers: 11 Production-Ready Methods

Polish ships with two battle-tested polishers featuring 11 carefully crafted methods that complement (never duplicate) Laravel's existing Number and Str classes. Start using them today, or study their implementation to master your own polisher creation:

NumberPolisher: 5 Methods for Advanced Number Display

Perfect for rankings, progress indicators, and user-facing number displays:

Real-world impact: Transform boring numbers into engaging user experiences in leaderboards, product ratings, test scores, version displays, progress indicators, and anywhere you need numbers to feel more human and less mechanical.

StringPolisher: 6 Methods for String Excellence

Professional string operations that go beyond Laravel's Str class, handling the complex formatting scenarios you face daily:

Real-World Use Cases: From Concept to Code

See Polish in action solving actual formatting challenges developers face every day:

Data Formatting

Status and States

Date and Time

Framework Integration: Works Everywhere You Do

Polish integrates seamlessly with every part of the Laravel ecosystem you're already using:

Filament

Livewire

Blade Components

API Resources

Creating Custom Polishers: Unleash Your Creativity

Polish truly shines when you create domain-specific polishers tailored to your application's unique needs. Here's how to build powerful, reusable formatting logic that will make your future self grateful:

Business-Specific Polishers

Creative Data Formatting

Integration Polishers

Domain-Specific Logic: The Sky's the Limit

Polish adapts to any industry or domain. Here are just a few examples of what developers are building:

Best Practices

  1. Keep methods focused - Each method should do one thing well
  2. Use descriptive names - formatCurrency() is better than format()
  3. Handle edge cases - Always consider null, empty, or invalid inputs
  4. Document your methods - Add docblocks for complex formatters
  5. Test thoroughly - Write tests for all your polisher methods

The ultimate goal is to eliminate scattered formatting logic and create a clean, testable, and maintainable system for your presentation layer that actually brings joy to your development process.

Advanced Features: The Details That Matter

Automatic Method Validation

Polish includes intelligent reflection-based validation that catches typos before they become bugs:

No more silent failures or mysterious undefined method errors — Polish tells you exactly what went wrong and how to fix it.

Chainable Operations

Since polishers return formatted data, you can chain operations:

Why Polish? The Compelling Case

Polish isn't just another formatting library — it's a paradigm shift that solves real developer pain points:

The Technical Benefits

The Business Impact

The Developer Experience

Polish feels like what Laravel formatting should have been from the beginning — intuitive, powerful, and delightfully simple to use.


Start Polishing in the Next 5 Minutes

Ready to transform your formatting chaos into elegant, maintainable code? Here's your quickstart path:

  1. Install Polish (30 seconds)

  2. Create your first polisher (60 seconds)

  3. Add a method (90 seconds)

  4. Use it everywhere (The rest is history)

In under 5 minutes, you'll have eliminated scattered formatting logic and created your first centralized polisher. Your future self will thank you every time you need to update that formatting logic and it happens instantly across your entire application.

Requirements

License

MIT


All versions of polish with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hdaklue/polish contains the following files

Loading the files please wait ...