PHPackages                             sjones6/siege-li - 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. sjones6/siege-li

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

sjones6/siege-li
================

Customizable Laravel stubs

v0.1(9y ago)17MITPHPPHP &gt;=5.5.9

Since Nov 19Pushed 9y ago1 watchersCompare

[ Source](https://github.com/sjones6/siege-li)[ Packagist](https://packagist.org/packages/sjones6/siege-li)[ Docs](https://github.com/sjones6/siege-li)[ RSS](/packages/sjones6-siege-li/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

SiegeLI
=======

[](#siegeli)

This package allows for editing of stub templates, stub groups (to switch in and out of stub templates), and generating resourceful stubs (i.e., route, controller, model, views, model factory, migration, seeder, and test) with one command.

The center of SiegeLi is the resource and the mvc command. It generates all the boilerplate for resourceful interaction (CRUD) and persisting that resource to your database.

Requires Laravel 5.

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

[](#installation)

Require the package into your project.

Add the service provider to your providers array in `config/app.php`:

```
// Package Providers
SiegeLi\SiegeLiServiceProvider::class,

//
```

Publish the package: `artisan vendor:publish`. This will add a `stubs` directory to your `resources` directory, and a configuration file called `stubs.php` in your `config` directory.

SiegeLi will work even if you don't publish the package. However, you will not be able to customize templates or configure the package for your project. But if you need to get up and running quickly on a standard Laravel install, you can skip this step.

Configuration
-------------

[](#configuration)

If you're using a standard Laravel 5.3 file structure, SiegeLi should work out of the box. However, if anything is non-standard or you're using an older version of Laravel, edit the `config/stubs.php` to reflect this. Specifically, you may need to indicate the path to your controllers or routes file.

Usage
-----

[](#usage)

### Commands

[](#commands)

For the resource name, it is best to use snake\_case or spinal-case. The name will be converted to accepted standards (e.g., model name in StudlyCase).

- `artisan siege:m {resource-name} -m|--migration -s|--seeder -f|--factory`: make a model
- `artisan siege:v {resource-name} {view}`: make view (e.g., index, create, etc.) for a resource
- `artisan siege:c {resource-name} -r|--route`: make a controller for a resource
- `artisan siege:t {resource-name}`: make a test for a resource
- `artisan siege:mvc {resource-name}`: make resourceful MVC items (model, views, controller, routes, model factor, migration, database seeder, tests)

##### Command options

[](#command-options)

For each of the above commands, you can also pass the following optional parameters:

- `-o|--options=`: stub template groups to include when generating stubs. See below on stub blocks.
- `-a|--all`: include all optional resources (e.g., a model would also include migration, seeder, and factor) and optional template groups
- `-g|group`: use a certain stub template group (see below on groups)

### Stub Templates

[](#stub-templates)

When you publish the package, you will have a `stubs` folder in your `resources` directory. You can edit these at will.

### Stub Syntax

[](#stub-syntax)

Stubs use a simple syntax for populating variables and include/excluding template blocks.

##### Stub Variables

[](#stub-variables)

Variables are wrapped in double curly braces, without spaces, and without dollar sign.

```
use {{namespace}}\User;
```

The following stub variables are available for use in any template:

- 'resource': raw resource name (the name you passed in when using the command)
- 'namespace': application namespace
- 'model': model name
- 'model\_camel': model name in camel case
- 'primary\_key': column name for the primary key
- 'class\_name': class name, e.g., "ResourceController" when making a controller
- 'slug': resource slug
- 'table': resource table name

##### Stub Blocks

[](#stub-blocks)

Stub template blocks are between ``. Blocks can be included or excluded conditionally using `-o|--option` parameter. For instance, running a stub command with `-o siege` on the following would include all `siege` blocks and exclude all `!siege` blocks:

```

{
//
}
>>>
```

You can also pass the `-a|--all` option to include all optional template blocks.

### Stub Groups

[](#stub-groups)

Groups provide a convenient way switch between stub templates given the needs of your project or individual preferences.

Generate a stub group with the command `artisan siege:group {group_name}`. For example, `artisan siege:group test` will create a directory `resources/stubs/test` populated with stubs. If you want to use another group as the base for this new stub group, add the `-f|--from` option.

You then will need to add the stub group to `config/stubs.php` file.

```
	'siege' => 'base/',
	'test-group' => 'test/'
```

Now you can use the name `test-group` to access all of the stubs in the `test` directory.

You can set a default template group in `config/stubs.php` or indicate which group by passing a group name with the `-g|--group` option, like so:

```
php artisan siege:mvc Test -g test-group
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

3509d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12819256?v=4)[Spencer Jones](/maintainers/sjones6)[@sjones6](https://github.com/sjones6)

---

Tags

stubscustomizablelaravel-stubs

### Embed Badge

![Health badge](/badges/sjones6-siege-li/health.svg)

```
[![Health](https://phpackages.com/badges/sjones6-siege-li/health.svg)](https://phpackages.com/packages/sjones6-siege-li)
```

###  Alternatives

[laravel/octane

Supercharge your Laravel application's performance.

4.0k24.7M205](/packages/laravel-octane)[statamic/cms

The Statamic CMS Core Package

4.8k3.5M923](/packages/statamic-cms)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17818.7k](/packages/markwalet-nova-modal-response)[japanese-date/japanese-date

日本の暦、祝日を取り扱うライブラリ

169.9k](/packages/japanese-date-japanese-date)

PHPackages © 2026

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