cloudstudio / resource-generator Goto Github PK
View Code? Open in Web Editor NEWResource generator for Laravel Nova
Home Page: https://krato.github.io/resource-generator-docs/
License: MIT License
Resource generator for Laravel Nova
Home Page: https://krato.github.io/resource-generator-docs/
License: MIT License
Hi,
My resources are in App\Nova\Resources
, so the generated resources are not in a proper place.
The namespace could be anything actually (like App\Admin
), and it would be cool if it could be personalized in a config file.
Thanks,
Matt'
Hi,
Seems to be not compatible with laravel 6 fresh installation
Thx
Is this compatible with Laravel 6x? When I try to select a table from the drop down, none are listed.
Hello, this package is compatible with Laravel 8 and the last version of nova? (Thanks españoles) ;)
On model creating should allow to specify incrementing 'false' for UUID's
I forked the REPO. I was thinking of using this to run phpfmt
on the created files. I was gonna put some time in to make a pull-request if you are interested. I use this in sublime and works well with some great config options like PSR etc... Would be best to include it as part of a requirement and execute the python script against the generated PHP files.
https://github.com/nanch/phpfmt_stable
What do you think?
I've tried the installation & registration method for the resource-generator but receive: Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Class 'Cloudstudio\ResourceGenerator\ResourceGenerator' not found
I'm using Nova 1.1.4
I have a fair amount of tables that have a lot of columns and in most resources I only want the first 3-5 columns to show anywhere other than forms or details. When I create a resource I will have to go change this field for the often 20+ columns that are only needed to forms.
My request would be to be able to change default value of show in field to something other than all. Also it would be ideal that maybe you could have a setting to split into two default values. Say you want first 5 fields to alway be all and the rest to onlyonforms. It would give a lot more flexibility and save time for someone building resources on a lot of tables with lots of columns.
If not going to happen could you pint me in direction where I can make that change for my local instance?
I tried to install with a fresh Laravel + Nova installation but i get :
InvalidArgumentException
No hint path defined for [resource-generator]. (View: /var/www/laravel/vendor/laravel/nova/resources/views/layout.blade.php)
it will be great to select from a dropdown list to chose the DB connections
and pass it to getTables
before show the tables list .
is there a plane for this ?
thanks .
Hi there!
Found this package today, seemd very nice as I have a bunch of tables to create as Resources. But after install and went to create my first resource I encountered this little error. :/
Call to undefined function Cloudstudio\ResourceGenerator\Http\Services\camel_case()
Doesn't work with Nova 4
Fresh install Laravel 6 & Nova v2.4.0.
Package: "cloudstudio/resource-generator": "^1.4"
Edited: Look like all helper function have been removed from Laravel 6.
/vendor/cloudstudio/resource-generator/resources/views/templates/resource.blade.php
Thanks.
tl;dr : Doctrine thinks MariaDB doesn't support the enum
field type and throws an exception when encountering it, preventing the tool to process the table informations.
No issue when the table doesn't have an enum field.
Hi !
I just brought Nova for my company and wanted to try your package, which seems super handy, but there seems to be an issue which it discovers table fields ?
When I choose the table in the "Create new Resource" I can see all the tables and I can see in the debug bar the show columns from roles
request (for the roles table).
However, the Title
or Search
fields only display the tree default fields.
When I click on the "Continue" button I got the following error in the Chrome console and the following form only display 3 lines (for the three default fields).
We use laravel 5.7.10, the last Nova 1.1.5 (but same thing with Nova v1.1.0), MariaDB 10.3.7.
Here is the error and stacktrace as displayed in the console :
vendor.js?id=72b92cfcd11b931f56d4:92382 [Vue warn]: Invalid prop: type check failed for prop "tables". Expected Object, got Array.
found in
---> <Column>
<Anonymous>
<Root>
warn @ vendor.js?id=72b92cfcd11b931f56d4:92382
assertProp @ vendor.js?id=72b92cfcd11b931f56d4:93421
validateProp @ vendor.js?id=72b92cfcd11b931f56d4:93349
loop @ vendor.js?id=72b92cfcd11b931f56d4:95123
initProps @ vendor.js?id=72b92cfcd11b931f56d4:95156
initState @ vendor.js?id=72b92cfcd11b931f56d4:95097
Vue._init @ vendor.js?id=72b92cfcd11b931f56d4:96417
VueComponent @ vendor.js?id=72b92cfcd11b931f56d4:96587
createComponentInstanceForVnode @ vendor.js?id=72b92cfcd11b931f56d4:96099
init @ vendor.js?id=72b92cfcd11b931f56d4:95920
createComponent @ vendor.js?id=72b92cfcd11b931f56d4:97397
createElm @ vendor.js?id=72b92cfcd11b931f56d4:97344
updateChildren @ vendor.js?id=72b92cfcd11b931f56d4:97634
patchVnode @ vendor.js?id=72b92cfcd11b931f56d4:97725
updateChildren @ vendor.js?id=72b92cfcd11b931f56d4:97611
patchVnode @ vendor.js?id=72b92cfcd11b931f56d4:97725
updateChildren @ vendor.js?id=72b92cfcd11b931f56d4:97615
patchVnode @ vendor.js?id=72b92cfcd11b931f56d4:97725
patch @ vendor.js?id=72b92cfcd11b931f56d4:97885
Vue._update @ vendor.js?id=72b92cfcd11b931f56d4:94459
updateComponent @ vendor.js?id=72b92cfcd11b931f56d4:94577
get @ vendor.js?id=72b92cfcd11b931f56d4:94931
run @ vendor.js?id=72b92cfcd11b931f56d4:95008
flushSchedulerQueue @ vendor.js?id=72b92cfcd11b931f56d4:94770
(anonymous) @ vendor.js?id=72b92cfcd11b931f56d4:93626
flushCallbacks @ vendor.js?id=72b92cfcd11b931f56d4:93547
Promise.then (async)
microTimerFunc @ vendor.js?id=72b92cfcd11b931f56d4:93595
nextTick @ vendor.js?id=72b92cfcd11b931f56d4:93639
queueWatcher @ vendor.js?id=72b92cfcd11b931f56d4:94857
update @ vendor.js?id=72b92cfcd11b931f56d4:94998
notify @ vendor.js?id=72b92cfcd11b931f56d4:92488
reactiveSetter @ vendor.js?id=72b92cfcd11b931f56d4:92805
proxySetter @ vendor.js?id=72b92cfcd11b931f56d4:95089
(anonymous) @ resource-generator:1
Promise.then (async)
goToFields @ resource-generator:1
invoker @ vendor.js?id=72b92cfcd11b931f56d4:93816
fn._withTask.fn._withTask @ vendor.js?id=72b92cfcd11b931f56d4:93615
Tanks for you time !
Hi,
I'm having the error : SQLSTATE[42704]: Undefined object: 7 ERROR: unrecognized configuration parameter "tables" (SQL: show tables)
in response of the getTables request.
This is probably because my database is Postgres.
We need to use proper laravel/doctrine methods instead of using raw commands:
$tables = DB::connection()->getDoctrineSchemaManager()->listTableNames();
Error:
Class Cloudstudio\ResourceGenerator\ResourceGenerator contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Laravel\Nova\Tool::menu)
Is Nova 4 support planned?
Page reload seems to not work
Thank you for that Laravel Nova package.
I tried it out on our project and had the problem, that it uses the database prefix as a part of the resource name. We defined the prefix in the config/database.php file, so every database table starts with "cms_".
Could you maybe add support for that function?
the $model
is set by the generator and it does not match my current models structures
(grouping the models with multi subfolders) ,
it will be great if I can chose a model file from a list or set the full path for it ,
loved the package by the way ❤️
thank you .
Great work on this one, looks very good! ❤️
A wonderful thing would also be able to generate migrations, not sure if it's already on your plans.
This should be 'exceptOnForms'
Please :)
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.