PHPackages                             intellow/make-route-for-laravel - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. intellow/make-route-for-laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

intellow/make-route-for-laravel
===============================

Adds a php artisan make:route command. This scaffolds the route in web.php, controller, and even generates a unit test

0.2(6y ago)22321[8 issues](https://github.com/iAmKevinMcKee/make-route-for-laravel/issues)MITPHPCI failing

Since Nov 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/iAmKevinMcKee/make-route-for-laravel)[ Packagist](https://packagist.org/packages/intellow/make-route-for-laravel)[ Docs](https://github.com/intellow/make-route-for-laravel)[ RSS](/packages/intellow-make-route-for-laravel/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (3)Versions (12)Used By (0)

Make Route For Laravel
======================

[](#make-route-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e7430ffc676b9e83bb04fb776ceef155cd0f0b6081612f3a687cb7293489b92c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e74656c6c6f772f6d616b652d726f7574652d666f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/intellow/make-route-for-laravel)[![Build Status](https://camo.githubusercontent.com/955d4a337a3918cd1797936044263063f0c70bc0b74da9ae948a7868c3f4b75f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f696e74656c6c6f772f6d616b652d726f7574652d666f722d6c61726176656c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/intellow/make-route-for-laravel)[![Quality Score](https://camo.githubusercontent.com/2ec9508bd9344a736c8e9471219f7b4ee1ae50156de03c396f91ef4ed6f351fc/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f696e74656c6c6f772f6d616b652d726f7574652d666f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/intellow/make-route-for-laravel)[![Total Downloads](https://camo.githubusercontent.com/bab8492faaf449cfc71831502447854aca90b922bcc6656b83c0100f6484cee5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e74656c6c6f772f6d616b652d726f7574652d666f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/intellow/make-route-for-laravel)

This is an opinionated package that creates boilerplate in your routes and controller files.

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

[](#installation)

You can install the package via composer:

```
composer require intellow/make-route-for-laravel
```

Usage
-----

[](#usage)

In your command line, you can now use a single artisan command to create the following:

- Entry in your routes file (web.php)
- Controller created if one does not exist
- Your specified method added to the bottom of the controller
- Model is created if one doesn't already exist (optional)
- Migration for the model is created if one doesn't already exist (optional)
- An empty view is created
- For index and create actions, a basic unit test is created
- More to come in future releases

Model Routes
------------

[](#model-routes)

If you are creating a route associated with a model, this is a great way to scaffold everything you need for that route.

```
php artisan make:model-route Model resourcefulAction
```

So if you run the following command

```
php artisan make:model-route PizzaPie index
```

You will get the following:

#### web.php

[](#webphp)

```
Route::get('/pizza-pies/', [\App\Http\Controllers\PizzaPieController::class, 'index']);
```

#### Http\\Controllers\\PizzaPieController.php

[](#httpcontrollerspizzapiecontrollerphp)

- This file will be created if it doesn't exist already
- The method will be added to the bottom of the controller

```
public function index()
{
    return view('models.pizza_pie.index');
}
```

#### resources\\views\\models\\pizza\_pie\\index.blade.php

[](#resourcesviewsmodelspizza_pieindexbladephp)

- Create this directory if it doesn't exist already
- Add a blank file with the following comment

```
{{--Create Something Amazing--}}
```

#### tests/Feature/AutomatedRouteTests.php

[](#testsfeatureautomatedroutetestsphp)

- This is only done on index and create actions
- Create this file if it doesn't already exist
- A basic feature test to hit this route (GET only) and assert a successful response

```
public function testPizzaPieIndex()
{
    $response = $this->get('pizza-pies');

    $response->assertStatus(200);
}
```

#### Create Model and Migration

[](#create-model-and-migration)

- If you have not yet created the model, you will be given the option to create it. If you choose to create the model, you can also choose to create the migration as well.
- This package will run `php artisan make:model PizzaPie` or `php artisan make:model PizzaPie -m` based on your choices

[![](make_route_v2.gif)](make_route_v2.gif)

Non-Model Routes
----------------

[](#non-model-routes)

If you are creating a route that is not associated with a model, the package works a bit differently.

```
php artisan make:route   []
```

So if you run the following command

```
php artisan make:route /send-activation-email store
```

You will get the following:

#### web.php

[](#webphp-1)

```
Route::post('/send-activation-email/', [\App\Http\Controllers\SendActivationEmailController::class, 'store']);
```

#### Http\\Controllers\\SendActivationEmailController.php

[](#httpcontrollerssendactivationemailcontrollerphp)

- This file will be created if it doesn't exist already
- The method will be added to the bottom of the controller

```
public function store(Request $request)
{

}
```

No view is created because this is a store action, and no test is created either since it is not an index or create action.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Kevin McKee](https://github.com/intellow)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~13 days

Recently: every ~31 days

Total

11

Last Release

2255d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/40676515?v=4)[Intellow](/maintainers/Intellow)[@intellow](https://github.com/intellow)

---

Top Contributors

[![intellow](https://avatars.githubusercontent.com/u/40676515?v=4)](https://github.com/intellow "intellow (24 commits)")

---

Tags

intellowmake-route-for-laravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/intellow-make-route-for-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/intellow-make-route-for-laravel/health.svg)](https://phpackages.com/packages/intellow-make-route-for-laravel)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)[illuminate/cookie

The Illuminate Cookie package.

224.3M122](/packages/illuminate-cookie)

PHPackages © 2026

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