Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Custom Make Command Laravel Package

ajaykushwaha25/custom-make-command

Laravel dev package adding custom Artisan generators: make:trait plus custom:class, custom:action, and custom:service to scaffold files under App (and subfolders). Also includes a UsesUUID trait to add UUID IDs to Eloquent models.

View on GitHub
Deep Wiki
Context7

Custom Make Command For Laravel

This package allows you to create custom make commands for your Laravel application, such as make:trait and more.

Installation

To install this package, require it using Composer. It is recommended to only require the package for development purposes.

composer require ajaykushwaha25/custom-make-command

Since Laravel uses Package Auto-Discovery, you don't need to manually add the ServiceProvider.

Laravel without auto-discovery:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

AjayKushwaha25\CustomMakeCommand\MakeCommandServiceProvider::class,

Commands available

The following commands are available after installing this package:

php artisan make:trait CustomTrait
php artisan custom:class CustomClass
php artisan custom:action ActionClass
php artisan custom:service ServiceClass

The make:trait command will create a trait file in the App\Traits folder.

The custom:class command will create a custom class file in the App folder. You can also specify a specific folder in which the class file should be generated. Note: The specified folder will be created inside the App folder.

UsesUUID Trait

The UsesUUID trait allows you to easily add UUID (Universally Unique Identifier) functionality to your Laravel model classes.

Usage

To use the UsesUUID trait in your model class, follow these steps:

  1. Import the trait at the top of your model class file:
use AjayKushwaha25\CustomMakeCommand\Traits\UsesUUID;
  1. Apply the trait to your model class:
class MyModel extends Model
{
    use UsesUUID;
    
    // ...
}

That's it! Your model class now has the UUID functionality provided by the UsesUUID trait.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui