Code Monkey home page Code Monkey logo

resource-generator's People

Contributors

cloudstudio avatar cuviline avatar krato avatar madeitbelgium avatar mathieutu avatar mixartemev avatar otienoh avatar programmende avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

resource-generator's Issues

[FR] Allow cutomizing Resources Namespace

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'

No Tables?

Is this compatible with Laravel 6x? When I try to select a table from the drop down, none are listed.

Laravel 8 support

Hello, this package is compatible with Laravel 8 and the last version of nova? (Thanks españoles) ;)

Problem with indenting

Hello,

When generating a new resource the code looks real messy.

Is there any way to fix this?

Look at the attatched screenshot for further explaining.

Skjermbilde 2019-06-16 kl  23 43 14

PhpFormat

@cloudstudio

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?

Feature Request - Change default value for Show In fields

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?

DOes this still work?

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)

[FR] support multiple DB connection

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 .

Receiving Undefined method camel_caseI()

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()

Nova 4

Doesn't work with Nova 4

Call to undefined function str_plural()

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.

Table columns are not read when using MariaDB and an enum field

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 !

[BUG] show tables on Postgres

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();

Nova 4

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?

Usage of database prefix

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?

[FR] allow custom model path or chose it from a list !

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 .

[Feature Request] Migrations

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.

Search fields when creating resource

Hi,
When creating a resource, the search fields field is in display:none and when displayed manually, it has no column available.

Is it an issue? Have I done something wrong?

Thanks.

screen shot 2018-11-22 at 10 15 59

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.