Contributions
We are excited to have you contribute to Generator! We welcome all contributions. You can contribute to this project by following these steps:
Make sure your environment is setup correctly, check requirements here.
Create local copy
the repository before making any changes. This will allow you to test your changes before submitting a pull request. Every change should be tested using dev branch.
Please fork the repository to your GitHub account by clicking the "Fork" button on the top right corner of the repository page, click here
Create a new Laravel project:
shcomposer create-project laravel/laravel generator-devor
shlaravel new generator-devMove into the newly Laravel project and install the required libraries:
shcomposer require laravel/fortify spatie/laravel-permission intervention/image-laravel yajra/laravel-datatables-oracleCreate the
packages/evdigi-inafolder in the main project directoryManually or using command:
shmkdir packages/evdigi-inacdintopackages/evdigi-inafolder and clone the repositoryshcd packages/evdigi-inabashgit clone https://github.com/{your-github-username}/generator.git
Prepare the environment
Have you cloned the repository? Great! Now let's prepare the environment.
cdinto/generatorand install the dependenciesshcd generatorinstall the dependencies
shcomposer iReturn to the main project directory of the Laravel project.
Add the following code to
composer.jsonjson"autoload": { "psr-4": { "App\\": "app/", "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/", "EvdigiIna\\Generator\\": "packages/evdigi-ina/generator/src/" } },Run the following command
shcomposer dump-autoloadAdd the following code to
bootstrap/app.phpIMPORTANT
If you don't have the
withProvidersmethod, you can add it manually.WARNING
If you can't add "withProviders" like the example below, most likely you are using an older version of Laravel.
php->withProviders([ \EvdigiIna\Generator\Providers\GeneratorServiceProvider::class, //... ])Publish the necessary files for Generator
shphp artisan generator:install fullAdd the following code to
composer.json(same location as step 4)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" ] },Add the following code to
bootstrap/app.phpagain, because the previous process overwrites the filephp->withProviders([ \EvdigiIna\Generator\Providers\GeneratorServiceProvider::class, //.. ])Then execute the following command again
shcomposer dump-autoloadMigrate the database
shphp artisan migrate --seedRun the local development server
shphp artisan serveMake the desired code changes in
packages/evdigi-ina/generator
Submit a Pull Request
Ensure the code works well
TIP
It would be better if you create unit tests as well (optional)
Push the code to your forked repository
bashgit push origin mainCreate a Pull Request with "dev" as the base branch to be merged into, we will review your code and merge your changes on the next release.
