PHPackages                             rahamatjahan/sql-exec - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. rahamatjahan/sql-exec

ActiveLibrary[CLI &amp; Console](/categories/cli)

rahamatjahan/sql-exec
=====================

A laravel package that adds an artisan command to execute .sql files

013PHP

Since Jan 19Pushed 7y agoCompare

[ Source](https://github.com/rahamatj/sql-exec)[ Packagist](https://packagist.org/packages/rahamatjahan/sql-exec)[ RSS](/packages/rahamatjahan-sql-exec/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel MySQL Management Tool
=============================

[](#laravel-mysql-management-tool)

SQL Exec is an artisan plugin that I wrote in order to run .sql files and play around with raw SQL Queries.

Features
--------

[](#features)

- Execute .sql files
- List MySQL tables
- Show table structure
- List table rows
- Delete all rows from table
- Drop table
- Empty all tables from database
- Delete all tables from database

Installation
------------

[](#installation)

- `composer require rahamatjahan/sql-exec`
- Next, add the Service Provider in your `config/app.php` inside of the `providers[]` array:

```
'providers' => [

    /*
    * Package Service Providers...
    */

    RahamatJahan\SqlExec\SqlExecServiceProvider::class,

],

```

Commands
--------

[](#commands)

The plugin adds the following commands to artisan, all prefixed by `php artisan`.

CommandDescriptionExamplesql:exec {file\_name}Execute a .sql file kept in the `database/sqls` folder. Filename in the command doesn't need the .sql extension.`php artisan sql:exec create_employees_table`sql:describe {table\_name}Show table structure.`php artisan sql:describe employees`sql:show {table\_name}Show table rows.`php artisan sql:show employees`sql:empty {table\_name}Delete all table rows.`php artisan sql:empty employees`sql:drop {table\_name}Drop table from database.`php artisan sql:drop employees`sql:drop --force {table\_name}Add `--force` option (`-f` for short) with `drop` to forcefully drop table from database without foreign key checks.`php artisan sql:drop --force employees`sql:tablesList all tables in the database.`php artisan sql:tables`sql:tables --emptyAdd `--empty` option (`-e` for short) with `tables` to empty all tables.`php artisan sql:tables --empty`sql:tables --dropAdd `--drop` option (`-d` for short) with `tables` to drop all tables from database.`php artisan sql:tables --drop`sql:tables --drop --forceAdd `--drop --force` options (`-d -f` for short) with `tables` to forcefully drop all tables from database without foreign key checks.`php artisan sql:tables --drop --force`

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8cd150a9aefd056131066b071675d1553055fc909bc4df69410485fbfc804d7c?d=identicon)[rahamatj](/maintainers/rahamatj)

---

Tags

laravel-packagemysqlphp

### Embed Badge

![Health badge](/badges/rahamatjahan-sql-exec/health.svg)

```
[![Health](https://phpackages.com/badges/rahamatjahan-sql-exec/health.svg)](https://phpackages.com/packages/rahamatjahan-sql-exec)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
