{"id":20234483,"url":"https://github.com/karam-mustafa/apis-generator","last_synced_at":"2025-04-10T18:42:16.936Z","repository":{"id":57007641,"uuid":"296431768","full_name":"karam-mustafa/apis-generator","owner":"karam-mustafa","description":"Apis generator for laravel, accelerate your work by building for your new api just a few clicks.","archived":false,"fork":false,"pushed_at":"2021-12-11T23:45:10.000Z","size":308,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T16:23:16.096Z","etag":null,"topics":["api","api-rest","apis","crud-api","crud-application","curd","laravel","laravel-package","restful-api"],"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/karam-mustafa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-17T20:10:52.000Z","updated_at":"2023-03-28T23:50:04.000Z","dependencies_parsed_at":"2022-08-21T12:30:10.543Z","dependency_job_id":null,"html_url":"https://github.com/karam-mustafa/apis-generator","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karam-mustafa%2Fapis-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karam-mustafa%2Fapis-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karam-mustafa%2Fapis-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karam-mustafa%2Fapis-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karam-mustafa","download_url":"https://codeload.github.com/karam-mustafa/apis-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248271910,"owners_count":21075800,"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":["api","api-rest","apis","crud-api","crud-application","curd","laravel","laravel-package","restful-api"],"created_at":"2024-11-14T08:10:58.563Z","updated_at":"2025-04-10T18:42:16.911Z","avatar_url":"https://github.com/karam-mustafa.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Apis Generator\n[![License](https://poser.pugx.org/kmlaravel/apis-generator/license)](//packagist.org/packages/kmlaravel/apis-generator)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/kmlaravel/apis-generator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/kmlaravel/apis-generator/?branch=master)\n[![Build Status](https://scrutinizer-ci.com/g/kmlaravel/apis-generator/badges/build.png?b=master)](https://scrutinizer-ci.com/g/kmlaravel/apis-generator/build-status/master)\n[![Code Intelligence Status](https://scrutinizer-ci.com/g/kmlaravel/apis-generator/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence)\n[![Code Quality](https://www.code-inspector.com/project/14583/score/svg)](https://www.code-inspector.com/project/14583/score/svg)\n# Notes \n\u003e ### laravel 8 not supported yet !\n\u003e\nAPIs generator was developed for [laravel 5.8+](http://laravel.com/) to accelerate your\nwork by building for your new api just a few clicks.\n\nthis package came with a base controller which helps to handle some logic and generate responses,\nwe will develop all functions that help developers to reduce development time,\nsimple interface to manage api creations process and view all api you had made before based on the credential JSON file. \n\nWhat does this package build?\n-------------------------\nthis package auto-build :\n- Model : with fill fillable properties depending on the values you chose.\n- Request : with validations rules and handle validation error message.\n- Controller : with full crud process based on the base controller.\n- Resource : to get resources data from the model.\n- Migration : with auto-generate for your database columns.\n\nFeatures\n--------\n- Friendly simple interface to create your api with dark mode option using [Darkmode.js](https://github.com/sandoche/Darkmode.js).\n- Giving you the choice to choose what to build.\n- The large development space in the future update.\n\nInstallation\n------------\n##### 1 - Dependency\nThe first step is using composer to install the package and automatically update your composer.json file, you can do this by running:\n\n```shell\ncomposer require kmlaravel/apis-generator\n```\n- #### Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.\n##### 3 - Copy the package providers to your local config with the publish command, this will publish asset and config :\n```shell\nphp artisan vendor:publish --provider=\"KMLaravel\\ApiGenerator\\Providers\\ApisGeneratorServiceProviders\"\n```\n- #### or you may publish asset and config separately.\n##### 3 - Copy the package config to your local config with the publish command:\n```shell\nphp artisan vendor:publish --tag=apis-generator-config\n```\nIn `apis_generator.php` configuration file you can determine the properties of the default values and some behaviors.\n\n##### 4 - Copy the package assets to your local resource views with the publish command:\n```shell\nphp artisan vendor:publish --tag=apis-generator-asset\n```\n\nBasic usage\n-----------\n##### 1 - Load your routes\nAs we said a little while ago we save your process result in `resource/views/ApiGenerator/credential.josn` \nthis file contains an array that in turn contains objects each one contains controller class name, URL, api title, and type for your api.\n\nto run this route we have to add this facade class in your `routes/api.php` file.\n```php \n\\KMLaravel\\ApiGenerator\\Facade\\KMRoutesFacade::getRoutes();\n```\nnow all your routes load automatically from routes in `credential.json` file.\n##### 2 - create your api\n\nyou should navigate to `{{ your base url }}/apis-generator/create`.\n\n![create_page](assets/create.png)\n\n##### 3 - view all api you have made\nyou can navigate to `{{ your base url }}/apis-generator/index`.\n\n![index_page](assets/index.png)\n\nconfig options\n----------------\n\u003e ## add middleware to package routes\n\u003e\nthe initial package route middleware is `web`\nif you want to add any custom middleware you can do that by adding middleware keys in middleware arrays\n```php\n    /*\n    |--------------------------------------------------------------------------\n    | package routes middleware\n    |--------------------------------------------------------------------------\n    |\n    | this middleware array if you want to add custom middleware to package route,\n    | this is applies to ( /apis-generator/index ) and ( /apis-generator/create ).\n    |\n    */\n    //example\n    \"middleware\" =\u003e [\n        'admin',\n    ],\n```\n\u003e ## add more database column types\n\u003e\nyou can do that by adding the type label to column_type array \n\n```php\n    /*\n    |--------------------------------------------------------------------------\n    | types of the column in database which laravel provider.\n    |--------------------------------------------------------------------------\n    |\n    | the options in database column select in creating a view,\n    | you can add or optimize this column.\n    |\n    */\n    \"column_type\" =\u003e [\n        'text',\n        'string',\n        ...\n    ],\n```\n\nChangelog\n---------\nPlease see the [CHANGELOG](https://github.com/kmlaravel/apis-generator/blob/master/CHANGELOG.md) for more information about what has changed or updated or added recently.\n\nSecurity\n--------\nIf you discover any security related issues, please email them first to karam2mustafa@gmail.com, \nif we do not fix it within a short period of time please open a new issue describing your problem. \n\nCredits\n-------\n[karam mustafa](https://www.linkedin.com/in/karam2mustafa)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaram-mustafa%2Fapis-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaram-mustafa%2Fapis-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaram-mustafa%2Fapis-generator/lists"}