PHPackages                             marcpacuri/l5scaffold - 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. marcpacuri/l5scaffold

ActiveLibrary

marcpacuri/l5scaffold
=====================

Extend Laravel 5's generators using Semantic UI scaffolding.

1.0.10(9y ago)020MITPHPPHP &gt;=5.4.0

Since Apr 23Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (14)Used By (0)

Laravel 5.2 Scaffold Generator
==============================

[](#laravel-52-scaffold-generator)

Hi, this is a forked scaffold generator for Laravel 5.2. using Semantic UI styles instead of Bootstrap

Usage
-----

[](#usage)

### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require 'robbielove/l5scaffold' --dev

```

install landish/pagination in your project - this project uses it for pagination Controllers

```
composer require landish/pagination

```

### Step 2: Add the Service Provider

[](#step-2-add-the-service-provider)

Open `config/app.php` and, to your **providers** array at the bottom, add:

```
        laralib\L5scaffold\GeneratorsServiceProvider::class,

```

### Step 3: Run Artisan!

[](#step-3-run-artisan)

You're all set. Run `php artisan` from the console, and you'll see the new commands `make:scaffold`.

If you would like a Semantic UI based layout; Rename the generated layout.blade.php to app.blade.php, create a folder called layouts in the resources/views folder, place the app.blade.php template in there. Modify this template to your own needs. all generated scaffolds use this template.

If you want to use it for your entire app simply return the layouts.app view to index routes (app/Http/Controllers/HomeController.php):

```
public function index()
    {
        return view('layouts.app');
    }

```

Examples
--------

[](#examples)

Ensure you include at least 1 field for the schema to generate or you will get an 'array to string' conversion error.

(Don't include the default fields: id, name, description, slug, active\_flag, author\_id, timestamps)

```
php artisan make:scaffold Object \
  --ui="sui2" \
	--schema="title:string:default('Object 1'), body:text" \

```

Always use the plural version of your prefix:

```
php artisan make:scaffold Object \
  --ui="sui2" \
	--schema="title:string:default('Object 1'), body:text" \
	--prefix="settings"

```

You can also use the old Bootstrap styles if you prefer

```
php artisan make:scaffold Object \
  --ui="bs3" \
	--schema="title:string:default('Object 1'), body:text" \
	--prefix="settings"

```

These commands will generate:

```
app/Object.php
app/Http/Controllers/ObjectController.php
database/migrations/201x_xx_xx_xxxxxx_create_objects_table.php
database/seeds/ObjectTableSeeder.php
resources/views/layout.blade.php
resources/views/objects/index.blade.php
resources/views/objects/show.blade.php
resources/views/objects/edit.blade.php
resources/views/objects/create.blade.php

```

The generated migration will include by default:

```
$table->increments('id');
$table->string('name')->default('Un-Named Object');
$table->string('slug');
$table->text('description');

[Your custom fields]

$table->boolean('active_flag');
$table->integer('author_id')->unsigned()->default(0);
$table->foreign('author_id')->references('id')->on('users');
$table->timestamps();

```

And you will need to run the migration after ensuring it is correct;

```
php artisan migrate

```

Scaffold updating and customisation
-----------------------------------

[](#scaffold-updating-and-customisation)

After migrating you should add the fields that you added to the schema, to the controller as they are not added during the scaffold process. Ensure you add them to the create and update methods and include in validation if needed. The default fields will work out-the-box.

If you have created the scaffold with a prefix - you will need to tweak some of the views as they will not quite match up to the values the controller is expecting.

The stubs use the model name to add the icon also, in most cases this will not match up with a Semantic UI icon in which case you will need to choose one and then modify the scaffolds with the new icon name

The icons next to the fields shown on the create, edit and show views are also using the field name so you will likely want to customise these too. the default 'Name' field uses the Object icon.

[Semantic UI icons](http://semantic-ui.com/elements/icon.html)

Add your Routes to app/Http/routes.php

```
Route::bind('objects', function($value, $route) {
  return App\Object::whereSlug($value)->firstOrFail();
});
Route::resource("objects","ObjectController");

```

with prefix: (in some cases you may want to leave off some views such as index and create views) use the previous code if you use prefix groups since the prefix encloses that code instead.

if you are prefixing a top level object, make sure you place your prefixed routes above the top level pattern to avoid Laravel from skipping those routes and returning 404 errors (bit of a gotcha)

```
Route::bind('objects', function($value, $route) {
  return App\Object::whereSlug($value)->firstOrFail();
});
Route::resource('prefixes.objects', 'ObjectController',['except' => ['index'],['create']]);

```

Custom stub
-----------

[](#custom-stub)

Create a new folder inside **Stubs &gt; views** with your UI name as the folder name

Custom fields in `Stubs > views > **ui-name** > fields`

Custom pages in `Stubs > views > **ui-name** > pages`

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~43 days

Recently: every ~2 days

Total

11

Last Release

3595d ago

### Community

---

Top Contributors

[![robbielove](https://avatars.githubusercontent.com/u/13571547?v=4)](https://github.com/robbielove "robbielove (78 commits)")[![sylviot](https://avatars.githubusercontent.com/u/2183643?v=4)](https://github.com/sylviot "sylviot (44 commits)")[![fernandobritofl](https://avatars.githubusercontent.com/u/699879?v=4)](https://github.com/fernandobritofl "fernandobritofl (26 commits)")[![ryangurn](https://avatars.githubusercontent.com/u/1297082?v=4)](https://github.com/ryangurn "ryangurn (24 commits)")[![raphaelheitor](https://avatars.githubusercontent.com/u/2575337?v=4)](https://github.com/raphaelheitor "raphaelheitor (17 commits)")[![ace3](https://avatars.githubusercontent.com/u/12264813?v=4)](https://github.com/ace3 "ace3 (10 commits)")[![marcpacuri](https://avatars.githubusercontent.com/u/848196?v=4)](https://github.com/marcpacuri "marcpacuri (8 commits)")[![alnutile](https://avatars.githubusercontent.com/u/365385?v=4)](https://github.com/alnutile "alnutile (3 commits)")[![webbtj](https://avatars.githubusercontent.com/u/865814?v=4)](https://github.com/webbtj "webbtj (1 commits)")[![DeftNerd](https://avatars.githubusercontent.com/u/3002275?v=4)](https://github.com/DeftNerd "DeftNerd (1 commits)")[![Dev-Force](https://avatars.githubusercontent.com/u/11722123?v=4)](https://github.com/Dev-Force "Dev-Force (1 commits)")[![hootlex](https://avatars.githubusercontent.com/u/6147968?v=4)](https://github.com/hootlex "hootlex (1 commits)")[![itsazzad](https://avatars.githubusercontent.com/u/54909?v=4)](https://github.com/itsazzad "itsazzad (1 commits)")[![mankms](https://avatars.githubusercontent.com/u/392926?v=4)](https://github.com/mankms "mankms (1 commits)")

### Embed Badge

![Health badge](/badges/marcpacuri-l5scaffold/health.svg)

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

PHPackages © 2026

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