diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e383b3f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +* text=auto + +/.github export-ignore +/screenshot export-ignore +/tests export-ignore +.editorconfig export-ignore +.gitattributes export-ignore +.gitignore export-ignore +.nitpick.json export-ignore \ No newline at end of file diff --git a/.github/workflows/fix-php-code-styling.yml b/.github/workflows/fix-php-code-styling.yml new file mode 100644 index 0000000..6192905 --- /dev/null +++ b/.github/workflows/fix-php-code-styling.yml @@ -0,0 +1,27 @@ +name: "Fix PHP Code Styling" + +on: + push: + paths: + - '**.php' + +permissions: + contents: write + +jobs: + php-code-styling: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - name: Fix PHP code style issues + uses: aglipanci/laravel-pint-action@2.4 + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Fix styling \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/run-tests.yml similarity index 99% rename from .github/workflows/tests.yml rename to .github/workflows/run-tests.yml index b68123d..42f665e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,4 +1,4 @@ -name: Tests +name: run-tests on: [ push ] diff --git a/README.md b/README.md new file mode 100644 index 0000000..1e4c6b7 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# Laravel ERD + +[![Latest Version on Packagist](https://img.shields.io/packagist/v/recca0120/laravel-erd.svg?style=flat-square)](https://packagist.org/packages/recca0120/laravel-erd) +[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/recca0120/laravel-erd/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/recca0120/laravel-erd/actions?query=workflow%3Arun-tests+branch%3Amain) +[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/recca0120/laravel-erd/fix-php-code-styling.yml?branch=main&label=code%20styling&style=flat-square)](https://github.com/recca0120/laravel-erd/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) +[![Total Downloads](https://img.shields.io/packagist/dt/recca0120/laravel-erd.svg?style=flat-square)](https://packagist.org/packages/recca0120/laravel-erd) + +Automatically generate ERD from Laravel Models, and show ERD by [Vuerd](https://github.com/dineug/erd-editor) + +## Preview + +this preview is generated from [migrations](database/migrations) and [models](tests/fixtures/Models) + +![Vuerd](screenshot/vuerd.jpg) + +## Requirements + +| Lang | Version | +|:--------|:------------------------| +| PHP | 7.4, 8.0, 8.1, 8.2, 8.3 | +| Laravel | 8, 9, 10, 11 | + +## Installation + +You can install the package via composer: + +```bash +composer require recca0120/laravel-erd --dev +``` + +## Usage + +#### step 1. + +generate erd + +```bash +php artisan erd:generate +``` + +#### step 2. + +open url + +http://localhost/laravel-erd + +## + +## Advanced \ No newline at end of file diff --git a/screenshot/vuerd.jpg b/screenshot/vuerd.jpg new file mode 100644 index 0000000..d505d9e Binary files /dev/null and b/screenshot/vuerd.jpg differ