tobya/devroute

Create a dev route file that is hidden in production

Installs: 3 585

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 1

pkg:composer/tobya/devroute

V1.1 2021-06-13 21:29 UTC

This package is auto-updated.

Last update: 2025-10-08 01:46:20 UTC


README

A Laravel package.

Adds a /dev routes routing file devroutes.php where you can store routes that are available for local testing, but unavailable in production.

All the routes will be available if

APP_ENV=local

but unavailable if your

APP_ENV=production

This is very useful when you have testing routes that you definitely dont want available when running in production.

Installation

 composer require tobya/devroute

Once installed will create a file routes/devroutes.php

Place any dev routes in this file, they are all prefixed with '/dev'. 'dev' routes have the standard web middlewares.

Route::get('/testuser/{user}', function($user){
  echo $user->name;
});

if you visit example.com/dev/testuser/4 you will get the information.