PHPackages                             oguzcandemircan/laravel-stub-generator - 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. oguzcandemircan/laravel-stub-generator

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

oguzcandemircan/laravel-stub-generator
======================================

:description

v0.1.1(4y ago)76.2k↓50%2MITPHPCI failing

Since Feb 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/oguzcandemircan/laravel-stub-generator)[ Packagist](https://packagist.org/packages/oguzcandemircan/laravel-stub-generator)[ Docs](https://github.com/oguzcandemircan/laravelstubgenerator)[ RSS](/packages/oguzcandemircan-laravel-stub-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

Laravel Stub Generator
======================

[](#laravel-stub-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/39ae0bc40e4fa9a3cb6e0ed68f76e8369e41b3406f34f464f935e1b06d8e2461/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f67757a63616e64656d697263616e2f6c61726176656c2d737475622d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oguzcandemircan/laravel-stub-generator)[![Total Downloads](https://camo.githubusercontent.com/caf92bb89a4ff966514623f26fe75a835d4d749f93f65e72c462a30dd343c865/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f67757a63616e64656d697263616e2f6c61726176656c2d737475622d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oguzcandemircan/laravel-stub-generator)

This is where your description should go. Take a look at [contributing.md](contributing.md) to see a to do list.

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

[](#installation)

Via Composer

```
$ composer require oguzcandemircan/laravel-stub-generator
```

Config
------

[](#config)

```
return [
    'source_path' => storage_path('stubs/source'), // stubs source path
    'target_path' => storage_path('stubs/target'), // stubs target path
];
```

Usage
-----

[](#usage)

Stub file:

```
//storage/stubs/source/model.stub

namespace {{namespace}};

use Illuminate\Database\Eloquent\Model;

class {{modelName}} extends Model
{
    protected $fillable = [{{fillable}}];
}
```

Generate:

```
LaravelStubGenerator::source('model')->params([
  '{{modelName}}' => 'UserModel',
  '{{namespace}}' => 'App\Models',
  '{{fillable}}' => "'name', 'email', 'age'",
])->generate();
```

Save:

```
LaravelStubGenerator::source('model')->params([
  '{{modelName}}' => 'UserModel',
  '{{namespace}}' => 'App\Models',
  '{{fillable}}' => "'name', 'email', 'age'",
])->save('UserModel.php');

// force save
->save('UserModel.php', true);
```

Output:

```
//storage/stubs/target/UserModel.php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class UserModel extends Model
{
    protected $fillable = ['name', 'email', 'age'];
}
```

Download:

```
LaravelStubGenerator::source('model')->params([
  '{{modelName}}' => 'UserModel',
  '{{namespace}}' => 'App\Models',
  '{{fillable}}' => "'name', 'email', 'age'",
])->download('UserModel.php');
```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Oğuzcan Demircan](https://github.com/oguzcandemircan)
- [All Contributors](../../contributors)

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~883 days

Total

2

Last Release

1768d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/56b08cd434ba1a561f39af9a63e6acaa40d9795a578d61e5e18f3aa2ab44ed1c?d=identicon)[oguzcan](/maintainers/oguzcan)

---

Top Contributors

[![oguzcandemircan](https://avatars.githubusercontent.com/u/19665071?v=4)](https://github.com/oguzcandemircan "oguzcandemircan (8 commits)")

---

Tags

phplaravelstubgeneratorlaravel stub generator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/oguzcandemircan-laravel-stub-generator/health.svg)

```
[![Health](https://phpackages.com/badges/oguzcandemircan-laravel-stub-generator/health.svg)](https://phpackages.com/packages/oguzcandemircan-laravel-stub-generator)
```

###  Alternatives

[monicahq/laravel-cloudflare

Add Cloudflare ip addresses to trusted proxies for Laravel.

3372.7M4](/packages/monicahq-laravel-cloudflare)[kra8/laravel-snowflake

Snowflake for Laravel and Lumen.

188402.3k6](/packages/kra8-laravel-snowflake)[laragear/preload

Effortlessly make a Preload script for your Laravel application.

119363.5k](/packages/laragear-preload)[rumenx/php-feed

Framework-agnostic PHP Feed generator for Laravel, Symfony, and more.

3652.3k](/packages/rumenx-php-feed)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

295.1k](/packages/linkxtr-laravel-qrcode)[tomatophp/filament-helpers

Helper Class Generator to manage your forms and table inside your filament app

127.9k](/packages/tomatophp-filament-helpers)

PHPackages © 2026

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