Giter Club home page Giter Club logo

laravel-code-generator's Introduction

Hi there ๐Ÿ‘‹, Victor Yoalli

GitHub stats

twitter website

Tech Stack: PHP, C#, JavaScript, Python, Ruby, Laravel, .NET, React, Vue.

laravel-code-generator's People

Contributors

mhkb avatar victoryoalli 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

Watchers

 avatar

laravel-code-generator's Issues

Invalid argument for laravel-code-generator.extensions loop

Any ideas on this error I get with latest version of Laravel... Perhaps I need to define laravel-code-generator.extensions somewhere?

This occurs when running a command like:
php artisan code:generator 'App\User' -c

Thanks

`
ErrorException

Invalid argument supplied for foreach()

at vendor/victoryoalli/laravel-code-generator/src/CodeGenerator.php:18
14| {
15| $app = app();
16| $this->view = $app['view'];
17| $extensions = config('laravel-code-generator.extensions');
> 18| foreach ($extensions as $ext) {
19| $this->view->addExtension("blade.{$ext}", 'blade');
20| }
21| $this->files = app(Filesystem::class);
22| }`

PhP 8 issue

- victoryoalli/laravel-code-generator is locked to version 1.0.9 and an update of this package was not requested.
- victoryoalli/laravel-code-generator 1.0.9 requires php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
- 

I fixed it by running:
composer require victoryoalli/laravel-code-generator --ignore-platform-reqs

PhP 8

[InvalidArgumentException]
Package victoryoalli/laravel-code-generator has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version

Hi amazing package you have but can you make it compatible with the new php8? Thanks in advance

MySQL dependency

I see this is dependent on MySQL

Can you add compatibility for MSSQL?

Undefined variable in Structure\Table

Hello, there is minor error here:
public function getColumns()
{
$cols = $this->table->getColumns();
$columns = []; <--missing
foreach ($cols as $key => $col) {
$columns[] = new Column($col);
}
return $columns;
}
and also minor error here:
try {
// handle abstract classes, interfaces, ...
$reflectionClass = new \ReflectionClass($model_name);

        if (!$reflectionClass->isSubclassOf('Illuminate\Database\Eloquent\Model')) {
            print_r("\nNot an eloquent '$model_name' class");
            return false;
        }

        if (!$reflectionClass->IsInstantiable()) {
            // ignore abstract class or interface
            return false;
        }

        $model = $this->app->make($model_name);
        $this->model = new Model($model);
        $finder = new RelationFinder();
        if ($recursive) {
            $this->model->relations = $finder->getModelRelations($model_name);
        }
    } catch (\Exception $e) {
        print_r('Exception: ' . $e->getMessage() . "\nCould not analyze class {$this->model->name}."); <---HERE
    }

this print_r fails if exception happens before $this->model declaration and all you get is "getting property name of undefined variable"
Thanks a lot, great utility, just what i looked for

php artisan code:generator 'Models\Datos' -FA proyecto de cero

Unable to find 'App\Models\Datos' class
TypeError

Argument 1 passed to App\Console\Commands\CodeGeneratorCommand::generate() must be an instance of VictorYoalli\LaravelCodeGenerator\Structure\Model, bool given, called in C:\wamp64\www\proyecto_taller\app\Console\Commands\CodeGeneratorCommand.php on line 80

80| $this->generate($m, $options, $theme, $force);
81| });
82| }
83|

84| public function generate(Model $m, $options, $theme, $force)
85| {
86| $option = (object) $options;
87| $folder = CodeHelper::plural(CodeHelper::snake($m->name));
88| if ($option->controller) {

1 C:\wamp64\www\proyecto_taller\app\Console\Commands\CodeGeneratorCommand.php:80
App\Console\Commands\CodeGeneratorCommand::generate("basic")

2 C:\wamp64\www\proyecto_taller\vendor\laravel\framework\src\Illuminate\Support\Traits\EnumeratesValues.php:202
App\Console\Commands\CodeGeneratorCommand::App\Console\Commands{closure}("App\Models\Datos")
este problema aparece es un proyecto en blanco segui los paso para

Laravel 7

Bit premature to create a ticket perhaps, but now I just tried with Laravel 7 (released today) and got the following error:

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Conclusion: remove laravel/framework v7.0.1
- Conclusion: don't install laravel/framework v7.0.1

...

- don't install illuminate/filesystem v5.8.27|don't install laravel/framework v7.0.1

...

Installation failed, reverting ./composer.json to its original content.

Where to add templates for custom template (Inertia.JS Vue Component)

Hi there, fantastic code - thanks for this.

I'm trying to get this setup to work with Tailwind and Inertia.JS and instead of creating blade view files I want to crate .vue components in resources/js/Pages/FolderName/create.vue etc.

I can do this with the following custom command: https://gist.github.com/raisonon/83a9589a40fcc8e2d9200f42461eaec8

However, I'm still getting the View file templates. I've created my own create.vue etc. files in views/vendor/lavevel-code-generator/basic folder but no luck.

Any advice on how I can create and select my own template files for these vue files?

Thanks in advance

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.