Code Monkey home page Code Monkey logo

laravel-generator's Introduction

InfyOm

InfyOm Laravel Generator

Total Downloads Monthly Downloads Daily Downloads License

Generate Admin Panels CRUDs and APIs in Minutes with tons of other features and customizations with 3 different themes.

Documentation

Read Documentation for detailed installation steps and usage.

Support Us

We have created 14+ Laravel packages and invested a lot of resources into creating these all packages and maintaining them.

You can support us by either sponsoring us or buying one of our paid products. Or help us by spreading the word about us on social platforms via tweets and posts.

Buy our Paid Products

InfyGPT

You can also check out our other paid products on CodeCanyon.

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site.

Backers

Become a backer and get your image on our README on Github with a link to your site.

Follow Us

Made with InfyOm Generator

Also, Do not forget to add your website to Made with InfyOm Generator List list.

Video Tutorials

Checkout Video Tutorials - By: Shailesh Ladumor

Security

If you discover any security-related issues, create an issue using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

laravel-generator's People

Contributors

ajayinfyom avatar alexanderreiff avatar ankitinfyom avatar cesarmtorres avatar claudiobastos avatar farhaninfyom avatar handiwijoyo avatar janbolat avatar josuemosunag12 avatar jschlies avatar katenkka avatar kronthto avatar mikepsinn avatar mitulgolakiya avatar motia avatar nightzpy avatar orteko avatar phillipmadsen avatar remxcode avatar reta110 avatar shailesh-ladumor avatar shaileshinfyom avatar shemgp avatar si-hamada avatar skys215 avatar thewebartisan7 avatar uniconstructor avatar vishalinfyom avatar wiwatsrt avatar xiaohuilam 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  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

laravel-generator's Issues

These would be a great additions to the generator

  1. Make a Remove or Delete or undo from a history command. This would remove all generated files like it was never there.

artisan php infyom-remove:api_scaffold Blog

  1. Make a enable / disable command

artisan php infyom:enable:api_scaffold Blog

artisan php infyom:diable:api_scaffold Blog

or

artisan php infyom:enable:api Blog

artisan php infyom:enable:scaffold Blog

artisan php infyom:diable:api Blog

artisan php infyom:enable:scaffold Blog

or

artisan php infyom:options Blog --enable=api, scaffold --disable=swagger

Anyway just thinking out loud. This would enable developers to add commands to the views to control each aspect of each generated section / crud.

As usual your system is great.

Maybe a Tracking / Changes / Updates / Created / Deleted Log Record

Create a crud history file showing all changes updates creations edits overwrites and removals so we an troubleshoot large project builds later.

Just an idea once again. I usually write me own but it would be another great addon.

example would be either on each file or a master record or maybe both sort of like wordpress revisions just without the rollback.

| NAME               |  LOCATION                               |  OVERWRITTEN  | UPDATED  | LAST MODIFIED    | Deleted  |
----------------------------------------------------------------------------------------------------------------------
UserController.php   | app/Http/Controllers/UserController.php | yes           | yes      | 03/02/2016 02:28 | no       |

Publish Bug

php artisan infyom.publish:templates

Does not publish common template files. So common stubs are not being added to view folder.

Recap of stubs not publishing

  1. _views directory_
    (also gnerator throws error because its looking for table.stub and you have them named table.blade.stub and same thing with the other view)
  2. _common directory_

failed to open stream: No such file or directory

Error when running
php artisan infyom.publish:auth
produces this:
[ErrorException] copy(/home/vagrant/grace/test.cart/vendor/infyom/core-templates/templates/scaffold/layouts/app.stub): failed to open stream: No such file or directory
The file stub is there but its still giving that error.

Route not needed: Route::get('owners/delete/{id}')

The generated route Route::get('owners/delete/{id}') it's not necessary. I suspect you created to bypass the problem of browsers that don’t recognize the DELETE verb, but with the routes generated by Route:resource(…) it's enough.

You can directly call the whatever.destroy route from the index view using a form. You need to modify the table.blade.php to use a submit button using a form, which allows you to use the hidden verb DELETE.

what does searchable do?

when creating fields one of the steps is declaring searchable status. what does searchable do?

Undefined variable: errors

After a "from tables" generation and all the publish commands i got :

ErrorException in eb802082d2e01daa6efc08b644bb03f92293542a.php line 1: Undefined variable: errors (View: D:\wamp\apps\infyom\vendor\infyomlabs\core-templates\views\common\errors.blade.php) (View: D:\wamp\apps\infyom\vendor\infyomlabs\core-templates\views\common\errors.blade.php)

[Feature]: using presenter

once i use php artisan infyom:scaffold ModelName no presenter class will be created. how can i have a presenter class to integrate with respective Model?

add tableName method

I dont see any method to return model table's name. if there isnt one , i suggest to add this method to BaseRepository:

 public function tableName()
    {
        return $this->model->getTable();
    }

also its important to be an intermediate repository between _Model_Repository and BaseRepository to enable user to add his own methods

Sugestion - Migration versioning

Hello Mitul,

First of all, congrastulations for this package, is awesome, especially because of allowing project-specific configurations and templating. Wonderful.

I have sugestion, that think is easily achievably (using laravel collections).
For a given migration, check if table already exists on DB.
If not, goes as today.
If it exists, goes to different abstraction, where compare schema, and makes migration accordingly.

What do you think?

New Feature Request

Ability to select table to populate select field in current DB.

Example
{
"fieldInput": "select_test:string",
"htmlType": "select:table:column1, column2",
"searchable": true
},

Suggestion - Inplement generation of CRUD methods in Models.

Implement generation of convenience methods such as listed below as appears the case with
"php artisan models:generate" . See "user11001/eloquent-model-generator".

public function contacts()
{
    return $this->belongsToMany(\App\Models\Contact::class, 'client_contacts', 'client_id',
                                'contact_id');
}

public function clientContacts()
{
    return $this->hasMany(\App\Models\ClientContact::class, 'client_id', 'id');
}

public function property()
{
    return $this->belongsTo(\App\Models\Property::class, 'property_id', 'id');
}

Show field radio bug

You can check with the json fields example,

Generated index and show, is misbehaving when we check 2 checkboxes.

I suggest this is solved with saving as JSON encoded in text.

But i guess, for the quick scaffolding only will not be a problem.

Even so, who wants to use it right out of the box, will be with this error

field type question

Can you add a checkbox field for boolean? with option for default unchecked.

core-templates error because of web middleware

@include('core-templates::common.errors')

returns this:

ErrorException in 738befae3e778accfa7edc7bda672348bdebf4da.php line 1:
Undefined variable: errors (View: /home/vagrant/grace/blade.clip/vendor/infyomlabs/core-templates/views/common/errors.blade.php) (View: /home/vagrant/grace/blade.clip/vendor/infyomlabs/core-templates/views/common/errors.blade.php)

Question about prefix

A while back I asked if you would be adding a prefix so one could build out normal crud and then build it again but with say and Admin prefix and it would prefix everything that is needed to make it work. such as routes/ links assets and anything else that would need to be changes.
Ping pong generators has one that works great but they do not have a system built as good as this one. You said you were going to add this option. I am just wondering if you have a status on that or if you are still going to do to.

let me now thanks

fatal error when migrate DB

after i run infyom:scaffold and executed successfully
i run the DB migration and it gives me:
[Symfony\Component\Debug\Exception\FatalErrorException]
Cannot redeclare class CreateDepartmentsTable

[Feature]: New Feature Request

Would it possible to generate a crud using multiple tables in the same one?

Here is an example.

  • CRED = BLOG
    • TABLES=
      • POSTS
      • CATEGORIES
      • TAGS

In doing it this way we could create the views stubs to use all data from the three tables?

Just a thought. Let me know what you think.

New Feature Request

Add foreign key field.

Something like:

 {
    "fieldInput": "exampe_id:integer:unsigned",
    "htmlType": "foreign:{table}examples:onU,cascade:onD,cascade",
    "validations": "",
    "searchable": false,
    "fillable": false,
    "primary": true
  },

Generates

            $table->foreign('example_id')
                    ->references('id')
                    ->on('examples')
                    ->onUpdate('cascade')
                    ->onDelete('cascade');

Also a Combined field index or unique possibility.

Something like:

{
"fieldInput": "sku,cart_id", 
"htmlType": "unique", 
"validations": "", 
"searchable": false, 
"fillable": true,
 "primary": false 
},
{
"fieldInput": "sku,cart_id,user_id", 
"htmlType": "index", 
"validations": "", 
"searchable": false, 
"fillable": true,
 "primary": false 
},
{
"fieldInput": "sku,order_id,user_id", 
"htmlType": "index", 
"validations": "", 
"searchable": false, 
"fillable": true,
 "primary": false 
}

Examples

$table->unique(['sku', 'cart_id']);
$table->index(['user_id', 'sku', 'cart_id']);
$table->index(['user_id', 'sku', 'order_id']);

Or possibly a straight import type

Something like:

 {
    "fieldInput": "import",
    "htmlType": "$table->index(['user_id', 'sku', 'order_id']);",
    "validations": "",
    "searchable": false,
    "fillable": false,
    "primary": true
  },

Examples Output

$table->index(['user_id', 'sku', 'order_id']);

This last one would enable a person to add columns to the table that are needed and are not possible through the generator. Just a thought

primary key from table generation

Hi,
I did a
php artisan infyom:api $MODEL_NAME$
with two tables on a postgresql database.
The primary keys names are not 'id' but something else. The model files doesn't find them.

Should only implicit 'id' primary key fields be supported ?

New feature: Datatables option

Hello bro,
maybe add option for implement datatable javascript plugin for index page.
For laravel exists some packages for this job. This is one: https://github.com/yajra/laravel-datatables.

Greets.

Select html type: Bug or new feature!

When generate a select field, is obligatory add items to select list:

select-field-name:option1,2,3

Maybe, i don't want add statis list item, because the select will be filled from another database table!

This may be a new feature or just a bug?

Can be assign relations? Or new feature?

Would be good relations can be assigned by command or json!

Maybe:

php artisan infyom:scaffold Post --relations="hasMany(Comment), belongsTo(User)"

Or

php artisan infyom:scaffold Post --hasMany=Comment --belongsTo=User

Add to schema file and generator

This is the current data for a field:

{
"fieldInput": "id:increments",
"htmlType": "",
"validations": "",
"searchable": false,
"fillable": false,
"primary": true
},

When using a crud with many fields we need to add a way to include and exclude from the index.blade.php page in the table.blade.php output.

This is what it needs.

{
"fieldInput": "id:increments",
"htmlType": "",
"validations": "",
"incInIndexTable": "false", // THIS IS TO IDENTIFY THE FIELDS TO ADD THE THE TABLE OUTPUT
"searchable": false,
"fillable": false,
"primary": true
},

Also another type that would be very useful is boolean checkbox. right now you have checkbox group but not just a normal checkbox.

Something along the lines of this:

{
"fieldInput": "checkbox_test:boolean",
"htmlType": "default:Checked"
},

Anyway keep up the awesome work you are great.

delete Model issue

index table template has a delete link that uses a simple GET request (no form ) to delete an item(Model). so there is no CSRF checking . maybe it would be better to implement a form to delete items and use POST instead of GET request.

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.