{"id":13545637,"url":"https://github.com/reliese/laravel","last_synced_at":"2025-05-12T15:24:18.499Z","repository":{"id":37580304,"uuid":"71080508","full_name":"reliese/laravel","owner":"reliese","description":"Reliese Laravel Model Generator","archived":false,"fork":false,"pushed_at":"2025-03-20T16:18:41.000Z","size":650,"stargazers_count":1602,"open_issues_count":83,"forks_count":326,"subscribers_count":49,"default_branch":"v1.x","last_synced_at":"2025-04-23T17:14:17.751Z","etag":null,"topics":["database","eloquent","eloquent-models","laravel","laravel-components","mysql-database","scaffold"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reliese.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-10-16T22:13:15.000Z","updated_at":"2025-04-22T07:30:23.000Z","dependencies_parsed_at":"2023-12-04T14:54:34.043Z","dependency_job_id":"58d27d81-fb4b-4f17-80bf-eb497be07479","html_url":"https://github.com/reliese/laravel","commit_stats":{"total_commits":174,"total_committers":42,"mean_commits":4.142857142857143,"dds":0.8218390804597702,"last_synced_commit":"2fc69cbd416ae762ae9791b5b58adcb66b7c5b6c"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reliese%2Flaravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reliese%2Flaravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reliese%2Flaravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reliese%2Flaravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reliese","download_url":"https://codeload.github.com/reliese/laravel/tar.gz/refs/heads/v1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253764194,"owners_count":21960533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","eloquent","eloquent-models","laravel","laravel-components","mysql-database","scaffold"],"created_at":"2024-08-01T11:01:07.767Z","updated_at":"2025-05-12T15:24:18.468Z","avatar_url":"https://github.com/reliese.png","language":"PHP","funding_links":[],"categories":["PHP","Packages"],"sub_categories":["Database/Eloquent/Models"],"readme":"# Reliese Laravel Model Generator\n[![Build Status](https://travis-ci.org/reliese/laravel.svg?branch=master)](https://travis-ci.org/reliese/laravel)\n[![Latest Stable Version](https://poser.pugx.org/reliese/laravel/v/stable)](https://packagist.org/packages/reliese/laravel)\n[![Total Downloads](https://poser.pugx.org/reliese/laravel/downloads)](https://packagist.org/packages/reliese/laravel)\n[![Latest Unstable Version](https://poser.pugx.org/reliese/laravel/v/unstable)](https://packagist.org/packages/reliese/laravel)\n[![License](https://poser.pugx.org/reliese/laravel/license)](https://packagist.org/packages/reliese/laravel)\n\nReliese Laravel Model Generator aims to speed up the development process of Laravel applications by \nproviding some convenient code-generation capabilities. \nThe tool inspects your database structure, including column names and foreign keys, in order \nto automatically generate Models that have correctly typed properties, along with any relationships to other Models.\n\n## How does it work?\n\nThis package expects that you are using Laravel 5.1 or above.\nYou will need to import the `reliese/laravel` package via composer:\n\n### Configuration\n\nIt is recommended that this package should only be used on a local environment for security reasons. You should install it via composer using the --dev option like this:\n\n```shell\ncomposer require reliese/laravel --dev\n```\n\nAdd the `models.php` configuration file to your `config` directory and clear the config cache:\n\n```shell\nphp artisan vendor:publish --tag=reliese-models\n\n# Let's refresh our config cache just in case\nphp artisan config:clear\n```\n\n## Models\n\n![Generating models with artisan](https://cdn-images-1.medium.com/max/800/1*hOa2QxORE2zyO_-ZqJ40sA.png \"Making artisan code my Eloquent models\")\n\n### Usage\n\nAssuming you have already configured your database, you are now all set to go.\n\n- Let's scaffold some of your models from your default connection.\n\n```shell\nphp artisan code:models\n```\n\n- You can scaffold a specific table like this:\n\n```shell\nphp artisan code:models --table=users\n```\n\n- You can also specify the connection:\n\n```shell\nphp artisan code:models --connection=mysql\n```\n\n- If you are using a MySQL database, you can specify which schema you want to scaffold:\n\n```shell\nphp artisan code:models --schema=shop\n```\n\n### Customizing Model Scaffolding\n\nTo change the scaffolding behaviour you can make `config/models.php` configuration file\nfit your database needs. [Check it out](https://github.com/reliese/laravel/blob/master/config/models.php) ;-)\n\n### Tips\n\n#### 1. Keeping model changes\n\nYou may want to generate your models as often as you change your database. In order\nnot to lose your own model changes, you should set `base_files` to `true` in your `config/models.php`.\n\nWhen you enable this feature your models will inherit their base configurations from\nbase models. You should avoid adding code to your base models, since you\nwill lose all changes when they are generated again.\n\n\u003e Note: You will end up with two models for the same table and you may think it is a horrible idea \nto have two classes for the same thing. However, it is up to you\nto decide whether this approach gives value to your project :-)\n\n#### Support\n\nFor the time being, this package supports MySQL, PostgreSQL and SQLite databases. Support for other databases are encouraged to be added through pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freliese%2Flaravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freliese%2Flaravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freliese%2Flaravel/lists"}