{"id":14109496,"url":"https://github.com/thedevsaddam/laravel-schema","last_synced_at":"2025-04-10T02:29:37.082Z","repository":{"id":57067931,"uuid":"67035478","full_name":"thedevsaddam/laravel-schema","owner":"thedevsaddam","description":"Display the connected database information from Terminal.","archived":false,"fork":false,"pushed_at":"2019-10-11T05:42:35.000Z","size":179,"stargazers_count":112,"open_issues_count":3,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-10T22:51:48.201Z","etag":null,"topics":["database-info-commandline","laravel","laravel-schema","schema","schema-information"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/thedevsaddam/laravel-schema","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/thedevsaddam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-31T12:30:54.000Z","updated_at":"2024-08-24T17:25:27.000Z","dependencies_parsed_at":"2022-08-24T10:20:14.805Z","dependency_job_id":null,"html_url":"https://github.com/thedevsaddam/laravel-schema","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedevsaddam%2Flaravel-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedevsaddam%2Flaravel-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedevsaddam%2Flaravel-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedevsaddam%2Flaravel-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thedevsaddam","download_url":"https://codeload.github.com/thedevsaddam/laravel-schema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144089,"owners_count":21054866,"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-info-commandline","laravel","laravel-schema","schema","schema-information"],"created_at":"2024-08-14T10:02:20.757Z","updated_at":"2025-04-10T02:29:37.059Z","avatar_url":"https://github.com/thedevsaddam.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"Laravel Schema\n===================\n\n\nThis package will help to display database schema information from terminal.\n\n\n----------\n\nInstallation\n-------------\nVia Composer\n\n``` bash\n$ composer require thedevsaddam/laravel-schema\n```\nInstall manually (add the line to composer.json file)\n``` bash\n\"thedevsaddam/laravel-schema\": \"^2.0\"\n```\nThen open your terminal and hit the command\n```bash\ncomposer update\n```\n\nAdd the following line to config/app.php file's _providers_ array\n\n```php\nThedevsaddam\\LaravelSchema\\LaravelSchemaServiceProvider::class,\n```\nFor _lumen_ open bootstrap/app.php and add the line below\n\n```php\n$app-\u003eregister(Thedevsaddam\\LaravelSchema\\LaravelSchemaServiceProvider::class);\n```\n\n\u003chr/\u003e\n\n### **Available commands / Features**\n1. `php artisan schema:help` Display the available commands and usages.\n1. `php artisan schema:simple` Display overall tables with total rows count.\n1. `php artisan schema:list` Display all the available tables. schema information in list (_please see details below_).\n1. `php artisan schema:show` Display all the available tables schema information in tabular form (_please see details below_).\n1. `php artisan schema:table --t=yourTableName or --t=Namespace\\\\Model` Display a table's paginated data (_please see details below_).\n1. `php artisan schema:query --r=\"wirte your raw sql query in double quote\"` Perform a sql query.\n1. `php artisan schema:monitor` Display database server status.\n\n\u003chr/\u003e\n\n### **Usage in details**\n**Show Schema information in tabular form**\n```bash\n php artisan schema:show\n```\n\nExample output: Schema information in tabular form\n\n![Schema information in tabular form](https://raw.githubusercontent.com/thedevsaddam/laravel-schema/master/screenshots/tabular.png)\n\nIf you want to see a specific table then pass table name or Namespace\\\\\\Model\n```bash\n php artisan schema:show --t=tableName or --t=Namespace\\\\Model\n```\n\n![database info commandline](https://raw.githubusercontent.com/thedevsaddam/laravel-schema/master/screenshots/tabular-single.png)\n\n\n_Note: Same condition will be applied for tables **list** view_\n\n**Show Schema information in List**\n```bash\n php artisan schema:list\n```\n\nExample output: Schema information in list\n\n![database info commandline](https://raw.githubusercontent.com/thedevsaddam/laravel-schema/master/screenshots/list.png)\n\nAvaliable Options in **show** and **list**:\n\n* `--t=tableName` or `-t tableName` to provide table name or Namespace\\\\Model\n* `--c=connectionName` or `-c connectionName` to provide connection name\n\n\n\n**Show Table names and total rows**\n```bash\n php artisan schema:simple\n```\n\nExample output: Tables name with rows count\n\n![Tables name with rows count](https://raw.githubusercontent.com/thedevsaddam/laravel-schema/master/screenshots/simple.png)\n\n_Note: You may pass `--c=connectionName` or `-c connectionName` to display a specific connection schema info_\n\n\n\n**Show table definition**\n```bash\n php artisan schema:table --t=tableName or --t=Namespace\\\\Model\n```\n\nExample output: Table definition with default page and limit\n\n![Table definition with default page and limit](https://raw.githubusercontent.com/thedevsaddam/laravel-schema/master/screenshots/table-pagination.png)\n\nAvaliable Options in **table**:\n\n* `--t=tableName` or `-t tableName` to provide table name or Namespace\\\\\\Model (e.g: --t=App\\\\\\User or --t=users).\n* `--p=pageNumber` or `-p PageNumber` to provide current page which you want to see\n* `--o=orderBy` or `-o orderBy` to provide orderBy clause against a column (e.g: --o=id:desc or --o=id:asc [default asc]).\n* `--l=rowsLimitPerPage` or `-l rowsLimitPerPage` to provide number of rows you want to display (e.g: --l=20).\n* `--c=connectionName` or `-c connectionName` to provide connection name\n* `--w=widthOfTableCell` or `-w widthOfTableCell` to provide character length of cell to show in tables (numeric [default=10]).\n* `--s=columnName` to provide the column to display, you can provide comma (,) separated names to display (e.g: --s=name or --s=id,name).\n\n\n```bash\nphp artisan schema:table --t=countries --p=4 --o=id:desc --l=25\n```\n\n\n\n**Perform raw sql query**\n```bash\n php artisan schema:query --r=\"your sql query\"\n```\n\nExample output: Query result will be dumped in console\n\n![Query result will be dumped in console](https://raw.githubusercontent.com/thedevsaddam/laravel-schema/master/screenshots/raw-query.png)\n\nAvaliable Options in **query**:\n\n* `--r=yourRawQuery` or `-r yourRawQuery` to provide your raw sql query (e.g: --r=\"select * from someTable limit 20\").\n* `--c=connectionName` or `-c connectionName` to provide connection name (e.g: --c=mysql or -c sqlite)\n\n\n\n**Monitor database server**\n```bash\n php artisan schema:monitor\n```\n\nExample output: Showing the database status\n\n![Schema information in tabular form](https://raw.githubusercontent.com/thedevsaddam/laravel-schema/master/screenshots/monitoring-schema.png)\n\nYou can pass --i=integerNumber as refresh time interval and --c=ConnectionName as well\n```bash\n php artisan schema:monitor --i=3 --c=secondaryDatabase\n```\n\n\u003chr/\u003e\n\n### **License**\nThe **laravel-schema** is a open-source software licensed under the [MIT License](LICENSE.md).\n\n_Thank you :)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedevsaddam%2Flaravel-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthedevsaddam%2Flaravel-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedevsaddam%2Flaravel-schema/lists"}