mirhamzah/laravel-interactive-make

There is no license information available for the latest version (dev-master) of this package.

Interactive make commands for making Model and Migration with fields

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/mirhamzah/laravel-interactive-make

dev-master 2025-08-08 16:37 UTC

This package is auto-updated.

Last update: 2025-12-08 17:24:57 UTC


README

Interactive make commands for making Model and Migration with fields

composer require mirhamzah/laravel-interactive-make:dev-master

Then

php artisan make:imodel ModelName

Or

php artisan make:imodel ModelName -m

for making a new migration as well, just like with normal make:model command.

Screenshot

You can add relationships to existing model files using the command

#php artisan make:relationship [SourceModel] [RelationshipType] [TargetModel]

php artisan make:relationship User HasMany Acrticle

The above command will add following code to User model file:

use Illuminate\Database\Eloquent\Relations\HasMany;

public function articles(): ?HasMany
{
    return $this->hasMany(Article::class);
}
php artisan make:iview ModelName

The make:iview command generates view components for the specified model. It creates two files, create.jsx and edit.jsx, which are React components designed for creating and editing instances of the model. These components are automatically populated with form fields based on the $fillable and $casts properties defined in the model class, ensuring consistency between the model and its associated views.