laravellegends/interactive-model
This library is helpful to record data in the Eloquent models interactively via the command line.
8,521
1
| Install | |
|---|---|
composer require laravellegends/interactive-model |
|
| Latest Version: | 0.2.0 |
| Laravel: | 4 – 8 |
| License: | MIT |
| Last Updated: | Nov 18, 2021 |
| Links: | GitHub · Packagist |
Maintainer: wallacemaxters
Laravel Legends Interactive Model
This is a Laravel package to help you to record data in the Eloquent models interactively via the command line.
Instalation
Now, run in terminal:
composer require laravellegends/interactive-model
Usage examples
Example:
php artisan model:interactive User
or
php artisan model:interactive App\\Models\\User
Type the "name" value:
> Wallace Maxters
Type the "email" value:
> wallacemaxters@test.com
Type the "password" value:
> [automatic hidden]
Data inserted in table users
This command assume that your models is placed in App\Models namespace by default, if you not passed full namespace as argument.
The data asked to fill should be defined in $fillable in your model. For fields placed in $hidden, the prompt is automatically hidden.
Example:
namespace App\Models;
class User extends Model
{
protected $fillable = ['name', 'email', 'password'];
protected $hidden = ['password'];
}
Related Packages
repat/laravel-database-session-model
Eloquent Model for the sessions table as created by artisan session:table
11,537
1
repat/laravel-job-models
Eloquent Models for the tables job and job_fails as created by artisan queue:tab...
28,987
8
Version History
| Version | Released | Laravel | License |
|---|---|---|---|
| 0.2.0 | * | MIT | |
| 0.1.0 | * | MIT | |
| 0.0.1 | * | MIT |