Contributions ​
We are excited to have you contribute to Generator! We welcome all contributions. You can contribute to this project by following these steps:
WARNING
Make sure your PHP version is 8.2 or higher, 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-dev
or
shlaravel new generator-dev
Move into the newly Laravel project and install the required libraries:
shcomposer require laravel/fortify spatie/laravel-permission intervention/image-laravel yajra/laravel-datatables-oracle
Create the
packages/evdigi-ina
folder in the main project directoryManually or using command:
shmkdir packages/evdigi-ina
cd
intopackages/evdigi-ina
folder and clone the repositoryshcd packages/evdigi-ina
bashgit clone https://github.com/{your-github-username}/generator.git
Prepare the environment ​
Have you cloned the repository? Great! Now let's prepare the environment.
cd
into/generator
and install the dependenciesshcd generator
install the dependencies
shcomposer i
Return to the main project directory of the Laravel project.
Add the following code to
composer.json
json"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-autoload
Add the following code to
bootstrap/app.php
IMPORTANT
If you don't have the
withProviders
method, 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 full
Add 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.php
again, because the previous process overwrites the filephp->withProviders([ \EvdigiIna\Generator\Providers\GeneratorServiceProvider::class, //.. ])
Then execute the following command again
shcomposer dump-autoload
Migrate the database
shphp artisan migrate --seed
Run the local development server
shphp artisan serve
Make 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 main
Create 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.