Scaffold generator for Laravel 5.x

Overview

Laravel 5.x Scaffold Generator

Travis Packagist Tag

Usage

Step 1: Install Through Composer

composer require 'laralib/l5scaffold' --dev

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!

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

Examples

Use this command to generator scaffolding of Tweet in your project:

php artisan make:scaffold Tweet \
	--schema="title:string:default('Tweet #1'), body:text"

or with more options

php artisan make:scaffold Tweet \
	--schema="title:string:default('Tweet #1'), body:text" \
	--ui="bs3" \
	--prefix="admin"

This command will generate:

app/Tweet.php
app/Http/Controllers/TweetController.php

database/migrations/201x_xx_xx_xxxxxx_create_tweets_table.php
database/seeds/TweetTableSeeder.php

resources/views/layout.blade.php
resources/views/tweets/index.blade.php
resources/views/tweets/show.blade.php
resources/views/tweets/edit.blade.php
resources/views/tweets/create.blade.php

After don't forget to run:

php artisan migrate

Custom stub

Create a new folder inside Stubs > views with your UI name custom image

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

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


💭 Send us your ideas. (creating issues)

##Collaborators Fernando Brito
Sylvio Tavares
Raphael Heitor
Alfred Nutile
Sazzad Hossain Khan
Alexander Makhaev
Adam Brown
TJ Webb
Tsaganos Tolis
Ryan Gurnick

Comments
  • Composer service provider issue

    Composer service provider issue

    Can not add "Laralib\L5scaffold\GeneratorsServiceProvider" to app config provider

    "require": { "php": ">=5.5.9", "laravel/framework": "5.2." }, "require-dev": { "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.", "phpunit/phpunit": "~4.0", "symfony/css-selector": "2.8.|3.0.", "symfony/dom-crawler": "2.8.|3.0.", "laralib/l5scaffold": "^1.0" },

    bug 
    opened by MohamedQabbani 10
  •  Error: Class Illuminate\Foundation\Composer does not exist

    Error: Class Illuminate\Foundation\Composer does not exist

    I get the following error when trying to scaffold (in Laravel version 5.2):

    " Class Illuminate\Foundation\Composer does not exist"

    The class is removed in this version of Laravel.

    opened by sbrugman 10
  • scaffolding: Tweet undefined index: default

    scaffolding: Tweet undefined index: default

    Hello, when i use make:scaffold command on laravel 5.4 can create Migration, Seed, Tweet and TweetController files correctly but can't create views throws a [ErrorException] Undefined index: default

    captura

    opened by andreyarias 8
  • View form fields missing after running make:scaffold

    View form fields missing after running make:scaffold

    After running this command:

    php artisan make:scaffold Tweet --schema="title:string:default('Tweet #1'), body:text"

    php artisan migrate

    I do not see any form fields in the blade file.

    image

    Using version 1.0.8

    bug 
    opened by proprofs-workspace 8
  • Error create views: Undefined variable: schemaArray

    Error create views: Undefined variable: schemaArray

    I'm using laravel 5.2.x and an error occurred when creating views:

    [ErrorException]
    Undefined variable: schemaArray

    Exception trace: () at /var/www/html/blog/vendor/laralib/l5scaffold/src/Makes/MakeView.php:144 Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() at /var/www/html/blog/vendor/laralib/l5scaffold/src/Makes/MakeView.php:144 Laralib\L5scaffold\Makes\MakeView->replaceSchemaIndex() at /var/www/html/blog/vendor/laralib/l5scaffold/src/Makes/MakeView.php:101 Laralib\L5scaffold\Makes\MakeView->compileViewStub() at /var/www/html/blog/vendor/laralib/l5scaffold/src/Makes/MakeView.php:61 Laralib\L5scaffold\Makes\MakeView->generateView() at /var/www/html/blog/vendor/laralib/l5scaffold/src/Makes/MakeView.php:37 Laralib\L5scaffold\Makes\MakeView->start() at /var/www/html/blog/vendor/laralib/l5scaffold/src/Makes/MakeView.php:32 Laralib\L5scaffold\Makes\MakeView->__construct() at /var/www/html/blog/vendor/laralib/l5scaffold/src/Commands/ScaffoldMakeCommand.php:181 Laralib\L5scaffold\Commands\ScaffoldMakeCommand->makeViews() at /var/www/html/blog/vendor/laralib/l5scaffold/src/Commands/ScaffoldMakeCommand.php:100 Laralib\L5scaffold\Commands\ScaffoldMakeCommand->fire() at n/a:n/a call_user_func_array() at /var/www/html/blog/vendor/laravel/framework/src/Illuminate/Container/Container.php:507 Illuminate\Container\Container->call() at /var/www/html/blog/vendor/laravel/framework/src/Illuminate/Console/Command.php:169 Illuminate\Console\Command->execute() at /var/www/html/blog/vendor/symfony/console/Command/Command.php:256 Symfony\Component\Console\Command\Command->run() at /var/www/html/blog/vendor/laravel/framework/src/Illuminate/Console/Command.php:155 Illuminate\Console\Command->run() at /var/www/html/blog/vendor/symfony/console/Application.php:791 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/blog/vendor/symfony/console/Application.php:186 Symfony\Component\Console\Application->doRun() at /var/www/html/blog/vendor/symfony/console/Application.php:117 Symfony\Component\Console\Application->run() at /var/www/html/blog/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:107 Illuminate\Foundation\Console\Kernel->handle() at /var/www/html/blog/artisan:36

    bug 
    opened by jhosepharaujo 6
  • custom templates

    custom templates

    Hey... really nice idea

    I was missing scaffold from way/generators badly and you made it.

    as in original generators (way/generators).. do you have custom templates option?

    Thanks.

    opened by lorvent 6
  • Command

    Command "make:scaffold" is not defined.

    php artisan make:scaffold

      [Symfony\Component\Console\Exception\CommandNotFoundException]
      Command "make:scaffold" is not defined.
    

    installed with:

    composer require laralib/l5scaffold:master

    added (config/app.php) :

    Laralib\L5scaffold\GeneratorsServiceProvider::class,

    Running on W10, EasyPHP Dev Server (Apache 2.4, PHP 7.1) and Laravel 5.4

    opened by yurik94 5
  • Scaffold without migration

    Scaffold without migration

    Is it possible to update the package and be able to create a scaffold without a migration? Sometimes I pull in packages that already publish their own migrations and making another boilerplate one isn't necessary. or at least --schema="". But that option needs a value

    question 
    opened by jerrycoe 5
  • Could not find package `laralib/l5scaffold` at any version for your minimum-stability (stable).

    Could not find package `laralib/l5scaffold` at any version for your minimum-stability (stable).

    Hi! My Laravel Version is 5.2.29. When i enter command in cmd: composer requirelaralib/l5scaffold--dev The cmd show me error: [InvalidArgumentException] Could not find packagelaralib/l5scaffoldat any version for your minimum-stability (stable). Check the package spelling or your minimum-stability 2016-04-19_12-50-05 How i can install this package? P.S. Other packages have been established successfully Im sorry for my bad English:)

    opened by ilnurshax 4
  • readme instructions do not work

    readme instructions do not work

    I followed the instructions in the readme for a brand new Laravel app. I did the following which did not end well. See the error message at the bottom.

    $ laravel new myapp
    ...
    
    $ cd myapp/
    
    $ composer require 'laralib/l5scaffold' --dev
    Using version ^1.0 for laralib/l5scaffold
    ./composer.json has been updated
    > php artisan clear-compiled
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
      - Installing laralib/l5scaffold (1.0.4)
        Loading from cache
    
    Writing lock file
    Generating autoload files
    > php artisan optimize
    Generating optimized class loader
    
    $ vim config/app.php 
    
    $ php artisan
    
      [ReflectionException]                                
      Class Illuminate\Foundation\Composer does not exist 
    
    opened by petermichaux 4
  • unable to create scaffold

    unable to create scaffold

    While the migration and seeder are created, it soon halts with this...

    [InvalidArgumentException] The "--no-migration" option does not exist.

    opened by interludic 4
  •  In BoundMethod.php line 135:

    In BoundMethod.php line 135:

    Hi, I am using laravel5.5
    i have installed your plugin.Also checked using Php artisa Command here, i can see make:scaffold But if i try to generate a scaffold like Command

    php artisan make:scaffold Category .

    Its getting below error.

    In BoundMethod.php line 135:

    Method Laralib\L5scaffold\Commands\ScaffoldMakeCommand::handle() does not e xist Can any one help me.

    Thanks advance.

    opened by kjareena 1
  • Too many arguments, expected arguments

    Too many arguments, expected arguments "command" "name".

    Error Too many arguments, expected arguments "command" "name". in command

    php artisan make:scaffold Doctor \ --schema="name:string, crm:string, street:string, district:string, complement:string, postal_code:number, city:string, state:string"

    opened by vanessasoutoc 2
  • Scaffold can generate with users and role relationship

    Scaffold can generate with users and role relationship

    Hi, Wonderful plugin really. Its helps me a lot. Thanks for your plugin. I have small query.

    I am using laravel 5.4, in this can i generate with users and roles relationship Scaffold ????

    opened by kjareena 1
  • How to configure layout?

    How to configure layout?

    I'd like to be able to configure the layout that the package uses to create the HTML. How can I make this happen?

    Editing the files created by composer in the vendor folder is not an option since the layout would always be overridden when composer is updated... any ideas?

    Thank you

    opened by andresrex 0
Releases(1.0.10)
Owner
null
Generator-hedley - Scaffold a headless Drupal backend, Angular app client, and Behat tests

generator-hedley Scaffold a headless Drupal backend, Angular app client, and Behat tests Hedley is a yeoman generator that scaffolds a headless Drupal

null 99 Jun 3, 2022
This repo can be used to scaffold a Laravel package

This repo can be used to scaffold a Laravel package. Follow these steps to get started: Press the "Use template" button at the to

Spatie 1.4k Jan 4, 2023
Laravel Design Pattern Generator (api generator)

Laravel Design Pattern Generator (api generator) you can create your restful api easily by using this library and you can filter, sort and include elo

HusseinAlaa 2 Sep 25, 2022
Html menu generator for Laravel

Html Menu Generator for Laravel This is the Laravel version of our menu package adds some extras like convenience methods for generating URLs and macr

Spatie 813 Jan 4, 2023
A Laravel and Lumen Badges Generator

Laravel and Lumen Badge Generator That package is a easy wrapper to Badges/Poser. #Installing composer require vluzrmos/laravel-badge-poser Laravel co

Vagner Luz do Carmo 6 Jun 10, 2020
A package for Laravel One Time Password (OTP) generator and validation without Eloquent Model, since it done by Cache.

Laravel OTP Introduction A package for Laravel One Time Password (OTP) generator and validation without Eloquent Model, since it done by Cache. The ca

Lim Teck Wei 52 Sep 6, 2022
Laravel Livewire (TALL-stack) form generator with realtime validation, file uploads, array fields, blade form input components and more.

TALL-stack form generator Laravel Livewire, Tailwind forms with auto-generated views. Support Contributions Features This is not an admin panel genera

TinaH 622 Jan 2, 2023
Promotional Codes Generator for Laravel >5

laravel-promocodes Promocodes generator for Laravel 5.*. Trying to make the best package in this category. You are welcome to join the party, give me

Zura Gabievi 425 Dec 26, 2022
A Laravel Code Generator based on your Models using Blade Template Engine

Laravel Code Generator is a PHP Laravel Package that uses Blade template engine to generate code for you. The difference between other code generators

Victor Yoalli 59 Dec 5, 2022
Laravel 5 Model Factory Generator

Laravel 5 Model Factory Generator This package offers a lazy way to create a new model factory files, since Laravel (< 5.5) have no Artisan command to

Roni Yusuf Manalu 16 Feb 15, 2020
API generator for Laravel 5

Apify API generator for Laravel 5 Table Of Contents Installation Configuration Usage Installation To install apify use composer Download composer requ

Erik C. Forés 26 Dec 14, 2022
Laravel 5 Barcode Generator

This is a barcode generation package inspired by https://github.com/tecnickcom/TCPDF. Actually, I use that package's underline classes for generating

Nuruzzaman Milon 1.1k Jan 6, 2023
Secret Phrase Generator for Laravel.

Secret Phrase Generator for Laravel It generates secret pass phrase for Laravel Auth System. Require "require": { "php": "^7.3|^8.0",

null 2 Feb 21, 2022
Simple project to send bulk comma-separated emails using laravel and messenger module from quick admin panel generator.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Novath Thomas 1 Dec 1, 2021
Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.

Laravel Migrations Generator Generate Laravel Migrations from an existing database, including indexes and foreign keys! This package is cloned from ht

Kit Loong 1.4k Jan 1, 2023
Laravel MiGator - Migrations Generator

Laravel Migator A package that will allow developers to interactively generate schema migrations for a laravel application. It takes into account the

Synetic 2 Oct 13, 2022
Barcode generator in PHP that is easy to use, non-bloated and framework independent.

PHP Barcode Generator This is an easy to use, non-bloated, framework independent, barcode generator in PHP. It creates SVG, PNG, JPG and HTML images,

Picqer 1.4k Jan 6, 2023
The official Statamic 3 static site generator package

Statamic Static Site Generator Generate static sites with Statamic 3. Installation Install the package using Composer: composer require statamic/ssg

Statamic 187 Dec 25, 2022
🔹 Generator Template for 🙃 Phony Framework

?? Generator Template This repository contains the Generator Template for ?? Phony Framework. ?? Start generating fake data with ?? Phony Framework, v

Phonyland 2 Jan 30, 2022