PHPackages                             alpenist/artisan-teleport - 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. alpenist/artisan-teleport

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

alpenist/artisan-teleport
=========================

Provides laravel artisan support for changing the default generator folder

1.0.5(5y ago)1277MITPHPPHP ^7.4

Since Sep 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/alpenist/artisan-teleport)[ Packagist](https://packagist.org/packages/alpenist/artisan-teleport)[ Docs](https://github.com/alpenist/artisan-teleport)[ RSS](/packages/alpenist-artisan-teleport/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (6)Dependencies (4)Versions (7)Used By (0)

Artisan Teleport
================

[](#artisan-teleport)

[![Packagist Downloads](https://camo.githubusercontent.com/12def59a6155217143e7fbe1af9600ab595b28caba99b45e04366d91a5a078c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c70656e6973742f6172746973616e2d74656c65706f72743f636f6c6f723d677265656e266c6162656c3d446f776e6c6f616473266c6f676f3d476974687562267374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/12def59a6155217143e7fbe1af9600ab595b28caba99b45e04366d91a5a078c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c70656e6973742f6172746973616e2d74656c65706f72743f636f6c6f723d677265656e266c6162656c3d446f776e6c6f616473266c6f676f3d476974687562267374796c653d666f722d7468652d6261646765)

Provides Laravel Artisan support for more control on changing the default generated destination folder

Who is it for
-------------

[](#who-is-it-for)

The default laravel folder structure works perfectly fine for most cases but if you decided to take a different approach organizing your folder structure especially for larger than usual projects for example (**Hexagonal**, **Domain Driven** Architecture, etc....) then this package is useful for you if you still want to use **`artisan`** to generate your stubs without the need to manually change the newly created namespaces. It all will work the exact same way like the default make command and has all the options that each command provides.

You can alternate with the default make command and generate stubs easily in scenarios like this

```
 |-- laravel
    |-- bootstrap
    ...
    |-- src
       |-- App
          |-- Console
          |-- Exceptions
          |-- Providers
          ...
       |-- Acme
          |-- Clients
             |-- Models
             ...
          |-- Invoices
             |-- Models
             |-- Events
             |-- Observers
             ...
         ...
       ...
    ...
    |-- vendor
    |-- .env
    |-- server.php

```

or even hook to the composer in laravel folder from a completely different project outside the main laravel application if you want

```
 |-- laravel              |-- Project
    |-- bootstrap            |-- config
    ...                      |-- database
    |-- vendor               |-- resources
    |-- .env                 |-- src
    |-- server.php              |-- App
                                   |-- Console
                                   |-- Exceptions
                                   |-- Providers
                                   ...
                                |-- Acme
                                   |-- Clients
                                      |-- Models
                                      ...
                                   |-- Invoices
                                      |-- Models
                                      |-- Events
                                      |-- Observers
                                      ...
                                   ...
                                ...
                             |-- tests

```

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

[](#installation)

Install the package via composer:

```
composer require alpenist/artisan-teleport
```

Publish the config file with:

```
php artisan vendor:publish --provider="Ait\ArtisanTeleport\ArtisanTeleportServiceProvider" --tag="config"
```

Change the namespace of your package root in the published artisan-teleport.php config file, also change the root path relative to base\_path() if you need to:

```
return [

    /*
    |--------------------------------------------------------------------------
    | Artisan Teleport Signature
    |--------------------------------------------------------------------------
    |
    | This option controls the default artisan teleport "command" signature,
    | name. If no value is provided artisan teleport will simply not load.
    |
    */

    'signature_prefix' => 'create',

    /*
    |--------------------------------------------------------------------------
    | Artisan Teleport Defaults
    |--------------------------------------------------------------------------
    |
    | This option controls the default base path and namespace that will
    | be used to generate stubs in the location specified. If left empty
    | it will default to the "base_path()" and laravel Application
    | default namespace.
    |
    | Default namespace will be overridden if a key with the same name is found
    | in the namespaces array below
    |
    */

    'defaults' => [
        'assets' => '../../../folder/sub-folder',
        'base' => '../../../folder/sub-folder/src/Acme',
        'namespace' => 'Acme',
    ],

    /*
    |--------------------------------------------------------------------------
    | Artisan Teleport Namespaces
    |--------------------------------------------------------------------------
    |
    | You may specify multiple namespaces which allows you to generate
    | any stubs within the specified namespace and will also set the root
    | location of the generator at run time.
    |
    | Lets say you set the default namespace to "Acme" and the base folder
    | to "Company" now when you generate a model it will have
    | namespace Acme\Models; and the file location will be in Company/Models
    |
    | Now suppose you have a Domain folder where you want to keep school course related
    | logic, you may generate a model in the "School" namespace and place it under
    | School/Models folder on the fly by passing a second argument to the artisan command
    | like this: php artisan create:model Course School
    | (assuming your signature prefix is "create")
    |
    | Each key has a required 'namespace' key if not found the key will be discarded and will
    | revert to the default namespace settings
    |
    */

    'namespaces' => [
        // The first key will override the defaults setting above
        // Now the defaults will be set to:
        // namespace: AcmeCorp
        // base_path: ../../../folder/sub-folder/src/AcmeCorp/Domain
        'acme' => [
            'base_path' => '../../../folder/sub-folder/src/AcmeCorp',
            'path' => 'Domain',
            'namespace' => 'AcmeCorp',
        ],
        'app' => [
            'base_path' => '../../../folder/sub-folder/src/App',
            'path' => '',
            'namespace' => 'App',
        ],
    ],
];
```

Usage
-----

[](#usage)

Assuming **`signature_prefix`** is set to **`create`** and the default namespace set to **`App`** and the base path is set to **`project/src/App`** the following line will create a model with the namespace **`App\Clients\Models`** in **`project/src/App/Clients/Models`** folder

```
php artisan create:model Clients/Client
```

If you have defined an additional namespace **`Acme`** in the config which has base set to **`project/src/Acme`** you may provide the namespace as a second argument and it will create a model with the namespace **`Acme\Employees\Models`** in **`project/src/Acme/Employees/Models`** folder

```
php artisan create:model Employees/Employee Acme
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security
--------

[](#security)

If you discover any security related issues, please use the issue tracker.

Credits
-------

[](#credits)

- [Hiro Garabedian](https://github.com/Ait)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~0 days

Total

6

Last Release

2067d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3726646?v=4)[Hiro Garabedian](/maintainers/alpenist)[@alpenist](https://github.com/alpenist)

---

Top Contributors

[![alpenist](https://avatars.githubusercontent.com/u/3726646?v=4)](https://github.com/alpenist "alpenist (51 commits)")

---

Tags

artisanhexagonal-architecturelaravellaravelartisanalpenistartisan-teleport

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/alpenist-artisan-teleport/health.svg)

```
[![Health](https://phpackages.com/badges/alpenist-artisan-teleport/health.svg)](https://phpackages.com/packages/alpenist-artisan-teleport)
```

###  Alternatives

[nunomaduro/laravel-console-dusk

Laravel Console Dusk allows the usage of Laravel Dusk in Laravel/Laravel Zero artisan commands.

16255.4k7](/packages/nunomaduro-laravel-console-dusk)[guratr/nova-command-runner

Laravel Nova tool for running Artisan commands.

43232.8k1](/packages/guratr-nova-command-runner)[socialengine/sniffer-rules

A Lumen 5 and Laravel 5 SquizLabs Code Sniffer 2.0 artisan command. Detect violations of a defined coding standard. It helps your code remains clean and consistent.

1248.2k1](/packages/socialengine-sniffer-rules)[tamer-dev/laravel-env-cli

laravel commands to work with .env file in cli

126.5k](/packages/tamer-dev-laravel-env-cli)[sunaoka/laravel-facade-generator

Provide command line generation of facade layer files.

171.9k](/packages/sunaoka-laravel-facade-generator)

PHPackages © 2026

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