netpok/namespaced-laravel-models

This package is abandoned and no longer maintained. The author suggests using the laravel/framework package instead.

Laravel package to help setting default namespace for the make:model command

v2.0.1 2020-04-17 18:18 UTC

This package is auto-updated.

Last update: 2021-04-15 04:17:13 UTC


README

This package's sole purpose is to allow setting the default namespace for the Laravel make:model command and the other commands accepting models as parameters.

Abandoned

This package is abandoned since this feature is natively supported in Laravel 8 and later

Installation

You can install this package via composer:

composer require netpok/namespaced-laravel-models --dev

The service provider will automatically register or you may manually add the service provider in your config/app.php file:

'providers' => [
    // ...
    Netpok\NamespacedLaravelModels\ServiceProvider::class,
];

Configuration

By default this package sets the namespace to Models under your route namespace (App\Models), but feel free to publish the configuration and set your preferred namespace.

php artisan vendor:publish --provider="Netpok\\NamespacedLaravelModels\\ServiceProvider"

Laravel 7 support

Laravel 7 is under heavy development, but the current state (2019-10-24) is supported by the next branch.