PHPackages                             ronasit/larabuilder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ronasit/larabuilder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ronasit/larabuilder
===================

A great tool for creating and modifying PHP classes in Laravel, providing utilities to generate boilerplate code, add methods, properties, and annotations with ease.

0.0.6(1mo ago)4401[6 PRs](https://github.com/RonasIT/larabuilder/pulls)1MITPHPPHP ^8.4CI passing

Since Oct 10Pushed 1mo agoCompare

[ Source](https://github.com/RonasIT/larabuilder)[ Packagist](https://packagist.org/packages/ronasit/larabuilder)[ RSS](/packages/ronasit-larabuilder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (14)Versions (17)Used By (1)

[![Coverage Status](https://camo.githubusercontent.com/1a4d93746c59a9bad0419338b4a28c1fad1f1cf7b6bc4cd370515bf33b57ef9b/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f526f6e617349542f6c6172616275696c6465722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/RonasIT/larabuilder?branch=master)

Laravel Builder
===============

[](#laravel-builder)

Installation
------------

[](#installation)

```
composer require ronasit/larabuilder --dev
```

Usage
-----

[](#usage)

The logic of the package usage consists of the three stages:

1. Open a `php` file
2. Call required class modifications methods
3. Render modified class structure and overwrite existing file

```
new PHPFileBuilder(app_path('Models/User.php'))
    ->addArrayPropertyItem('fillable', 'is_active')
    ->setProperty('casts', [
        'is_active' => 'boolean',
    ], AccessModifierEnum::Protected)
    ->save();
```

### Features

[](#features)

#### setProperty

[](#setproperty)

Add new class property with the passed value and passed access level in case property does not exist in the class. Otherwise will change already existing class property's value **AND access level**

#### addArrayPropertyItem

[](#addarraypropertyitem)

Add new item to the `array` class property. Will add new property in case it does not exist yet.

#### removeArrayPropertyItem

[](#removearraypropertyitem)

Remove items from the `array` class property. If the property or item does not exist no action is taken.

#### insertCodeToMethod

[](#insertcodetomethod)

Insert the provided code into the specified method body at the desired position - by default, to the end of the method.

#### addImports

[](#addimports)

Add new imports to the file. This method will add a new import only in case it does not exist yet, preventing duplicate `use` statements.

Special Laravel structure builders
----------------------------------

[](#special-laravel-structure-builders)

### Bootstrap app

[](#bootstrap-app)

To modify the Laravel bootstrap app file, use special `AppBootstrapBuilder`:

```
new AppBootstrapBuilder()->addExceptionsRender(ExpectationFailedException::class,  '
    throw $exception;
')->save();
```

This builder has all the features described above and the special methods:

#### addExceptionsRender

[](#addexceptionsrender)

Adds a new exception render to the `withExceptions` called method in case it does not exist yet. Does not modify already added render for the passed exception class.

**Note** Need to provide the full exception class name (FQCN) to the method, it automatically imports it.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance90

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~25 days

Total

6

Last Release

47d ago

PHP version history (2 changes)0.0.1PHP ^8.3

0.0.2PHP ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1585993?v=4)[Evgeny Leonov](/maintainers/eleonov)[@eleonov](https://github.com/eleonov)

![](https://avatars.githubusercontent.com/u/129854316?v=4)[DPankratov](/maintainers/DPankratov)[@dpankratov](https://github.com/dpankratov)

---

Top Contributors

[![artengin](https://avatars.githubusercontent.com/u/152782500?v=4)](https://github.com/artengin "artengin (144 commits)")[![DenTray](https://avatars.githubusercontent.com/u/9486872?v=4)](https://github.com/DenTray "DenTray (71 commits)")[![AZabolotnikov](https://avatars.githubusercontent.com/u/110885041?v=4)](https://github.com/AZabolotnikov "AZabolotnikov (27 commits)")[![pirs1337](https://avatars.githubusercontent.com/u/98943794?v=4)](https://github.com/pirs1337 "pirs1337 (6 commits)")

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ronasit-larabuilder/health.svg)

```
[![Health](https://phpackages.com/badges/ronasit-larabuilder/health.svg)](https://phpackages.com/packages/ronasit-larabuilder)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.3k](/packages/blair2004-nexopos)[stillat/proteus

Provides utilities for parsing and updating Laravel-style PHP configuration files.

17287.4k22](/packages/stillat-proteus)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
