Skip to content

WARNING

You're browsing the documentation for an old version of Generator. Consider upgrading your project to Generator 0.4.

How to Contribute

To contribute to this project, please follow the following steps:

  1. Star & fork the repository

  2. Create a new laravel project using the following command:

    sh
    composer create-project laravel/laravel generator-dev

    or

    sh
    laravel new generator-dev
  3. Install the dependencies using the following command:

    sh
    composer require laravel/fortify spatie/laravel-permission intervention/image "^2.0" yajra/laravel-datatables-oracle
  4. Publish fortify resources

    sh
    php artisan vendor:publish --provider="Laravel\Fortify\FortifyServiceProvider"
  5. Create folder packages/evdigi-ina in the root of the project

  6. CD into packages/evdigi-ina, clone the repository

    bash
    git clone https://github.com/Evdigi-INA/generator.git

    and install the dependency

    sh
    composer i

    then back again into root project

  7. Add the following code to the composer.json

    json
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/",
            "EvdigiIna\\Generator\\": "packages/evdigi-ina/generator/src/"
        }
    },
  8. Run the following command

    sh
    composer dump-autoload
  9. Add the following code to the config/app.php

    php
    /*
    * Package Service Providers...
    */
    EvdigiIna\Generator\Providers\GeneratorServiceProvider::class,
    Yajra\DataTables\DataTablesServiceProvider::class,
    Spatie\Permission\PermissionServiceProvider::class,
    Intervention\Image\ImageServiceProvider::class,
    App\Providers\FortifyServiceProvider::class,
    // App\Providers\ViewComposerServiceProvider::class,
  10. Publish required file for the generator

    sh
    php artisan generator:install full
  11. Add the following code to the composer.json (autoload files)

    json
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/",
            "EvdigiIna\\Generator\\": "packages/evdigi-ina/generator/src/"
        },
        "files": [
            "App/Generators/helper.php"
        ]
    },
  12. Uncomment App\Providers\ViewComposerServiceProvider::class in config/app.php

  13. Then run for a second time

    sh
    composer dump-autoload
  14. Migrate the database

    sh
    php artisan migrate --seed
  15. Start local development server and go to /generators/create

    sh
    php artisan serve
  16. Make changes code as you wish in packages/evdigi-ina/generator

  17. Make sure the code is working properly

  18. Checkout to a new branch

    bash
     git branch your_name
    bash
    git checkout your_name
    bash
    git add .
    bash
    git commit -m "describe your changes"
  19. Push the code to the repository

    bash
    git push origin your_name
  20. Create a pull request.