Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
egyjs committed Nov 17, 2024
1 parent cef46d6 commit 233d00f
Show file tree
Hide file tree
Showing 28 changed files with 372 additions and 640 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: :vendor_name
github: egyjs
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/:vendor_slug/:package_name/discussions/new?category=q-a
url: https://github.com/egyjs/dbml-to-laravel/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/:vendor_slug/:package_name/discussions/new?category=ideas
url: https://github.com/egyjs/dbml-to-laravel/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/:vendor_slug/:package_name/security/policy
url: https://github.com/egyjs/dbml-to-laravel/security/policy
about: Learn how to notify us for sensitive bugs
19 changes: 0 additions & 19 deletions .github/dependabot.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/dependabot-auto-merge.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/fix-php-code-style-issues.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/phpstan.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/update-changelog.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Changelog

All notable changes to `:package_name` will be documented in this file.
All notable changes to `dbml-to-laravel` will be documented in this file.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) :vendor_name <author@domain.com>
Copyright (c) egyjs <el3zahaby@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ Generate Laravel Eloquent models and migration files directly from your DBML (Da
- **Relationship Parsing**: Automatically generate `belongsTo`, `hasOne`, and `hasMany` relationships based on DBML references.
- **Customizable Stubs**: Modify generated model and migration templates to fit your coding style.

## Package Description

A Laravel package that generates Eloquent models and migration files from DBML schema files. Simplify DBML parsing, automate relationship creation, and enhance development productivity.

## Installation

To use this package, add it to your Laravel project via Composer:

```bash
composer require egyjs/dbml-to-laravel
composer require egyjs/dbml-to-laravel --dev
```

Then, publish the stubs:
Expand Down Expand Up @@ -84,26 +88,26 @@ Table posts {
}
```

Running the command:
[Run](https://github.com/egyjs/dbml-to-laravel/wiki)ning the command:

```bash
php artisan generate:dbml schema.dbml
```

Will generate:
[Will generate:](https://github.com/egyjs/dbml-to-laravel/wiki)

- **User Model** (`app/Models/User.php`) with relationships to posts.
- **Post Model** (`app/Models/Post.php`) with a `belongsTo` relationship to users.
- **Migration Files** for `users` and `posts` tables in the `database/migrations` folder.
- **User Model** (`app/Models/User.php`[) ](https://github.com/egyjs/dbml-to-laravel/wiki)[with relationships to p](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md)o[sts.](https://github.com/egyjs/dbml-to-laravel/wiki)
- **[Post Model](https://github.com/egyjs/dbml-to-laravel/wiki)** (`app/Models/Post.php`)[ with a ](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md)[`belongsTo`](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md)[ relat](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md)ionship to users.
- **Migration Files** for `user`[`s`](https://github.com/egyjs/dbml-to-laravel/wiki)[ and](https://github.com/egyjs/dbml-to-laravel/wiki)[ ](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md)[`posts`](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md)[ tables in the ](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md)[`da`](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md)`tabase/migrations` folder.

## Requirements
## [Requirements](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md)

- Laravel 8.x or higher.
- PHP 8.0 or higher.
- [Laravel](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md) 8.[x or higher.](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md)
- [PHP 8.0](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md) or higher.

## Documentation

For detailed usage, examples, and advanced configuration, visit our [documentation page](https://github.com/egyjs/dbml-to-laravel/wiki).
For detailed usage, examples, and advanced configuratio[n, visit our ](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md)[documentat](https://github.com/egyjs/dbml-to-laravel/blob/main/CONTRIBUTING.md)[ion page](https://github.com/egyjs/dbml-to-laravel/wiki).

## Contributing

Expand Down
36 changes: 16 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,49 @@
{
"name": ":vendor_slug/:package_slug",
"description": ":package_description",
"name": "egyjs/dbml-to-laravel",
"description": "Generate Laravel Eloquent models and migration files directly from your DBML (Database Markup Language) files with ease.",
"keywords": [
":vendor_name",
"egyjs",
"laravel",
":package_slug"
"dbml-to-laravel"
],
"homepage": "https://github.com/:vendor_slug/:package_slug",
"homepage": "https://github.com/egyjs/dbml-to-laravel",
"license": "MIT",
"authors": [
{
"name": ":author_name",
"email": "author@domain.com",
"role": "Developer"
"name": "AbdulRahman Elzahaby",
"email": "el3zahaby@gmail.com",
"role": "Software Engineer"
}
],
"require": {
"php": "^8.2",
"spatie/laravel-package-tools": "^1.16",
"butschster/dbml-parser": "^0.3.0",
"illuminate/contracts": "^10.0||^11.0"
},
"require-dev": {
"laravel/pint": "^1.14",
"nunomaduro/collision": "^8.1.1||^7.10.0",
"larastan/larastan": "^2.9",
"orchestra/testbench": "^9.0.0||^8.22.0",
"pestphp/pest": "^2.34",
"pestphp/pest-plugin-arch": "^2.7",
"pestphp/pest-plugin-laravel": "^2.3",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"spatie/laravel-ray": "^1.35"
"pestphp/pest-plugin-laravel": "^2.3"
},
"autoload": {
"psr-4": {
"VendorName\\Skeleton\\": "src/",
"VendorName\\Skeleton\\Database\\Factories\\": "database/factories/"
"Egyjs\\DbmlToLaravel\\": "src/",
"Egyjs\\DbmlToLaravel\\Database\\Factories\\": "database/factories/"
}
},
"autoload-dev": {
"psr-4": {
"VendorName\\Skeleton\\Tests\\": "tests/",
"Egyjs\\DbmlToLaravel\\Tests\\": "tests/",
"Workbench\\App\\": "workbench/app/"
}
},
"scripts": {
"post-autoload-dump": "@composer run prepare",
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
"clear": "@php vendor/bin/testbench package:purge-dbml-to-laravel --ansi",
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"build": [
"@composer run prepare",
Expand All @@ -73,10 +69,10 @@
"extra": {
"laravel": {
"providers": [
"VendorName\\Skeleton\\SkeletonServiceProvider"
"Egyjs\\DbmlToLaravel\\DbmlToLaravelServiceProvider"
],
"aliases": {
"Skeleton": "VendorName\\Skeleton\\Facades\\Skeleton"
"DbmlToLaravel": "Egyjs\\DbmlToLaravel\\Facades\\DbmlToLaravel"
}
}
},
Expand Down
6 changes: 6 additions & 0 deletions config/dbml-to-laravel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

// config for Egyjs/DbmlToLaravel
return [

];
6 changes: 0 additions & 6 deletions config/skeleton.php

This file was deleted.

Loading

0 comments on commit 233d00f

Please sign in to comment.