laralib / l5scaffold Goto Github PK
View Code? Open in Web Editor NEWScaffold generator for Laravel 5.x
License: MIT License
Scaffold generator for Laravel 5.x
License: MIT License
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"
Thanks for the great package! I'm coming from Rails and feel right at home :)
Ran into an issue with the views generation pluralizing the route name, resulting in:
Route [inventories.store] not defined.
Steps to reproduce:
"repositories": [
{
"type": "git",
"url": "https://github.com/laralib/l5scaffold"
}
],
"require-dev": {
"laralib/l5scaffold": "dev-master"
},
and run:
$ composer update
$ php artisan make:scaffold Inventory --schema="inventory_product:integer, sale_price:integer, quantity:integer"
I don't have time to fix the issue today but if anyone can give me a push in the right direction I may have time in the future.
UPDATE:
The erronious route name also appears in the controller.
This tool is great for making scaffolds but they need to be essentially re-created or manually updated to take advantage of updated features, instead of excluding from the list of files to be created, could you make it so that the generated code is updated using the stubs and I suppose the differences like 'diff' but forcing new changes to overwrite if different.
Hi,
Do we have to define the route of I'm a facing an issue about routes ?
[ReflectionException]
Class Illuminate\Foundation\Composer does not exist for Laravel 5.2
"The Illuminate\Foundation\Support\Composer class has been moved to Illuminate\Support\Composer."
**Solution
change import class in Laralib\L5scaffold\Commands\ScaffoldMakeCommand
by replace
Illuminate\Foundation\Composer;
to
use Illuminate\Support\Composer;
I think in 5.1 the class was still named Illuminate\Foundation\Composer
, and it changed to Illuminate\Support\Composer
in 5.2.
However: https://github.com/laralib/l5scaffold/blob/laravel-5.1/src/Commands/ScaffoldMakeCommand.php (the laravel-5.1 branch) made the change introduced in #29, and I don't think it should have?
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.
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"
},
The delete field ends up looking like this for any show view generated
<form action="#/$file->id"
Also, the hidden input fields were missing from the delete as well
_method and _token
While the migration and seeder are created, it soon halts with this...
[InvalidArgumentException]
The "--no-migration" option does not exist.
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
Hello, as the title says I cant install this package through composer.
I get an error saying:
Could not find package 'laralib/l5scaffold' at anyversion for your minimun -stability (stable). Check the package spelling or your minimum-stability
When installed over a Laravel 5.4 installation, I get this message:
$ php artisan
[Symfony\Component\Debug\Exception\FatalErrorException]
Trait 'Illuminate\Console\AppNamespaceDetectorTrait' not found
I guess is something similar to this error laracasts/Laravel-5-Generators-Extended#125 (another package for extending artisan's make command.
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
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
Hi! My Laravel Version is 5.2.29.
When i enter command in cmd:
composer require
laralib/l5scaffold--dev
The cmd show me error:
[InvalidArgumentException] Could not find package
laralib/l5scaffoldat any version for your minimum-stability (stable). Check the package spelling or your minimum-stability
How i can install this package?
P.S. Other packages have been established successfully
Im sorry for my bad English:)
It would be good if one can specify that a scaffold one is creating is nested under another resource so that link to routes are created accordingly.
Hi
PHP Fatal error: Class 'Laralib\L5scaffold\GeneratorsServiceProvider' not found in C:\xampp\htdocs\cadastro2\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php on line 201
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
Hy All.
Is my first time using this package and it seems that there is an error after installation.
As Laravel's upgrade says:
"The Illuminate\Foundation\Support\Composer class has been moved to Illuminate\Support\Composer."
There's already a pull request for this: #82
Please update the master branch
Thanks
when I edit form no pass the validate, the body or title attr is data from the database,I hope can add {{ old('attr') }} in tpl.
Hi,
Nice Project.
But I have a question about the routes. Do I have to adjust the route file for myself or can this scaffold generator do this automatically?
Trait 'Illuminate\Console\AppNamespaceDetectorTrait' not found in laravel 5.4
[InvalidArgumentException]
Could not find package laralib\l5scaffold at any version for your minimum-stability (dev). Check the package spelling or your minimum-stability
Hello when I install the library for scaffold gives me the following error in laravel 5.1 ReflectionException]
Class Illuminate \ Support \ Composer does not exist
this-law run the command php artisan make: scaffold Tweet but I believe migration and seeder, unemployment does not go beyond that, does not create the models, or the views or controllers as say only laravel 5.1, I have not tried in laravel 5.2 or 5.3
$ php artisan make:scaffold Tweet --schema="name:string"
Configuring Tweet...
Migration created successfully
Seed created successfully.
[InvalidArgumentException]
The "--no-migration" option does not exist.
Though I haven't pass any --no-migration
command.
Is there any help?
Thanks in advance.
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 ????
I use scafold route and laravel 5.3 web route
when I browse from admin panel that rotued by scafold and index page that routed by laravel 5.3 user logout and I need to login again
How should I solve this problem?
Love the tool, HUGE time saver.
When generating a scaffold for a model with multiple words in the name (example "Email Message") the schema generation disagrees with Eloquent's standards for the table name. This examples creates a model called EmailMessage
, and (without editing the migration) a table called emailmessages
. Eloquent, by default expects the corresponding table to be snake case, so it expects email_messages
.
it would good if you provide the example config/app.php file so others can know how to add it i try like this
`/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
"Laralib\L5scaffold\GeneratorsServiceProvider"
],`
then run php artisan i get this error
[ReflectionException]
Class Illuminate\Foundation\Composer does not exist
Can you make the syntaxBuilder to build the laravelcollective/form?
I could not find anything related --ui and code does not have anything related to it
It would be nice if you could supply a route group prefix as an optional parameter. So the views can use the correct route
if no schema is specified I get:
[ErrorException]
Array to string conversion
Quick build modules, as well as routing hints, your components are very easy to use.
Use the command on your readme.md document,generate create.blade.php template have a little issue.
line 30:
Create
revise ==>
Create
Thinkyou!
I ran the following command which has a double space before has_parent:
php artisan make:scaffold Categories --schema="id:increments, name:string, has_parent:integer:unsigned, count:integer:unsigned"
Unfortunately the double space is now taken into account in the database field name. From the migration file:
$table->integer(' has_parent')->unsigned();
This also happens in the controller and the views.
This is a user mistake, but it would be nice if there was some sort of check to see if the input contains a valid field name.
When I try to install i get this error in the console:
Script php artisan optimize handling the post-update-cmd event returned with error code 255
Installation failed, reverting ./composer.json to its original content.
I'm newbie in laravel...
POL.
Hi,
When i installed the l5scaffold via composer with the specified command
composer require 'laralib/l5scaffold' --dev
My project starts to answer that
[ReflectionException]
Class Illuminate\Foundation\Composer does not exist
The package came with this line in the ScaffoldMakeCommand.php
use Illuminate\Foundation\Composer;
I just updated this line to fix this
use Illuminate\Support\Composer;
I think that the repository of composer has a messed up version of the package, just to alert you if you didn't know.
[]'s
Hi,
I get this error when running php artisan make:scaffold Tweet
[Symfony\Component\Console\Exception\InvalidArgumentException] The "prefix" option does not exist.
I am running L5.2.
Version 1.0.7.
example:{{ trans('manage.delete') }}
because I am from china,so I hope the view tpl can add translate.
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
I'm trying to install but :
[ReflectionException]
Class Illuminate\Foundation\Composer does not exist
It would be nice to have an option to use BootForm (and FormBuilder) for form generation.
I also find that it's common to share the credit/edit forms as there are very little differences other than "Add" vs "Edit", etc. How I do this is have a form.blade.php that create.blade.php and edit.blade.php sources via blade's at-include .
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.