PHPackages                             sluggergen/slugger - 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. [API Development](/categories/api)
4. /
5. sluggergen/slugger

ActiveLibrary[API Development](/categories/api)

sluggergen/slugger
==================

Laravel Rest API crud Generator

62692PHP

Since Jun 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/bonoosoft/slugger)[ Packagist](https://packagist.org/packages/sluggergen/slugger)[ RSS](/packages/sluggergen-slugger/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Rest API CRUD Generator

### Requirements

[](#requirements)

```
Laravel >=5.1 and Laravel = 5.5.9

```

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

[](#installation)

1. Run

    ```
    composer require sluggergen/slugger dev-master

    ```
2. Add service provider to **/config/app.php** file.

    ```
    'providers' => [
        ...

         Slugger\Crud\CrudServiceProvider::class,
    ],
    ```
3. Publish config file &amp; generator template files.

    ```
    php artisan vendor:publish --provider="Slugger\Crud\CrudServiceProvider"

    ```
4. All Done.

    ```

    ```

    ```

    ```

#### Crud command:

[](#crud-command)

```
php artisan crud:generate Posts --fields="title:string, body:text"

```

You can also easily include route, set primary key, set views directory etc through options **--route**, **--pk** :

```

Options:

- --fields : Fields name for the form & model.
- --route : Include Crud route to routes.php? yes or no.
- --pk : The name of the primary key.
- --namespace : Namespace of the controller.
- --route-group : Prefix of the route group.

-----------
-----------

#### Other commands (optional):

For controller generator:

```

php artisan crud:controller PostsController --crud-name=posts --model-name=Post --route-group=admin

```

For model generator:

```

php artisan crud:model Post --fillable="\['title', 'body'\]"

```

For migration generator:

```

php artisan crud:migration posts --schema="title:string, body:text"

```

```

Generate Pivot tables

```
php artisan make:migration:pivot tags posts

```

By default, the generator will attempt to append the crud route to your *routes/web.php* file. If you don't want the route added, you can use the option `--route=no`, or edit the route path on config file.

After creating all resources, run migrate command. *If necessary, include the route for your crud as well.*

```
php artisan migrate

```

If you chose not to add the crud route in automatically (see above), you will need to include the route manually. check your routes/api.php file

```
Route::apiResource('posts', 'PostsController');
```

### Supported Field Types

[](#supported-field-types)

These fields are supported for migration and view's form:

- string
- char
- varchar
- password
- email
- date
- datetime
- time
- timestamp
- text
- mediumtext
- longtext
- json
- jsonb
- binary
- number
- integer
- bigint
- mediumint
- tinyint
- smallint
- boolean
- decimal
- double
- float

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 96.4% of commits — single point of failure

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/c25a6489af384af98ed8318804d00edb6ef74ca44765157aeeaa460688e5424e?d=identicon)[slugger](/maintainers/slugger)

---

Top Contributors

[![bonoosoft](https://avatars.githubusercontent.com/u/45674107?v=4)](https://github.com/bonoosoft "bonoosoft (27 commits)")[![dododamba](https://avatars.githubusercontent.com/u/19868800?v=4)](https://github.com/dododamba "dododamba (1 commits)")

### Embed Badge

![Health badge](/badges/sluggergen-slugger/health.svg)

```
[![Health](https://phpackages.com/badges/sluggergen-slugger/health.svg)](https://phpackages.com/packages/sluggergen-slugger)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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