SkillAgentSearch skills...

Xeed

The Xeed is to generate new model, seed, database seed, factory, nova resource and migration files for Laravel & Nova based on data from the existing database table.

Install / Use

/learn @cable8mm/Xeed
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Xeed - Resources Generator for Laravel & Nova

code-style run-tests deploy-to-github-pages Packagist Version Packagist Dependency Version Laravel Version Static Badge Packagist Dependency Version Packagist Downloads Packagist Stars Packagist License

The Xeed is to generate new model, seed, Nova resources, database seed, factory and migration files for Laravel & Nova based on data from the existing database table.

[!TIP] It can function as both php artisan xeed:* commands for Laravel & Nova providing 100% identical functionality. Therefore, you can use it within your own Laravel & Nova project.

We have provided the API Documentation on the web. For more information, please visit https://www.palgle.com/xeed/ ❤️

Features

  • [x] Database testing is supported
  • [x] Generate models for Laravel
  • [x] Generate seed files for Laravel
  • [x] Generate Nova resources files for Laravel Nova
  • [x] Generate database seed files for Laravel
  • [x] Generate factories for Laravel
  • [x] Generate migrations for Laravel
  • [x] Generate belongsTo and hasMany relationships functions for Laravel
  • [x] Laravel multi & reserved columns supported
  • [x] Laravel integration
  • [x] MySQL, SQLite and PostgreSQL supported

Support & Tested

MySQL Supported SQLite Supported PostgreSQL Supported PHP 8.1.0+ Supported PHP 8.2.0+ Supported PHP 8.3.0+ Supported

Preview

Preview

Installation

composer require cable8mm/xeed --dev

Usage

-f option make it forced, and xeeds is the table make.

# Generate all models from database in `app/Models` folder
php artisan xeed:model

# Force to generate a model from `xeeds` table in `app/Models` folder
php artisan xeed:model xeeds -f

# Generate all factories from database in `database/factories' folder
php artisan xeed:factory

# Force to generate a factory from `xeeds` table in `database/factories' folder
php artisan xeed:factory xeeds -f

# Generate all seeds from database in `database/seeders` folder
php artisan xeed:seeder

# Force to generate a seeder from `xeeds` table in `database/seeders` folder
php artisan xeed:seeder xeeds -f

# Generate all seeds from database in `database/seeders` folder
php artisan xeed:faker-seeder

# Force to generate a seeder from `xeeds` table in `database/seeders` folder
php artisan xeed:faker-seeder xeeds -f

# Generate a database seed from database in `database/seeders` folder
php artisan xeed:database

# Generate all migrations from database in `database/migrations' folder
php artisan xeed:migration

# Force to generate a migration from `xeeds` table in `database/migrations' folder
php artisan xeed:migration xeeds -f

# Add the relation function to all models from database in `app/Models` folder
php artisan xeed:relation

# Runs xeed:models before running xeed:relations. Add -f to force to generate
php artisan xeed:relation -f

# Add the Laravel Nova resources to all tables in `app/Nova` folder
php artisan xeed:nova

# Clean generated files, seeders, models, factories and migration files.
php artisan xeed:wipe

Formatting

# Modify all files to comply with the PSR-12.
composer lint

# Inspect all files to ensure compliance with PSR-12.
composer inspect

Testing

It uses the built-in SQLite database, not your own database. It will never cause harm to your data. You don't need to worry about that.

# Run `vendor/bin/testbench package:test tests`
composer testpack
# Run `vendor/bin/phpunit tests`
composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

The below can help you contribute.

The Xeed has a built-in SQLite database, allowing you to contribute easily without needing your own database. Simply create a new file for testing purposes and utilize it.

# Create a new empty file for SQLite database
touch database/database.sqlite

And then,

# Run tests
composer test

Database seeds

For migrations and factories, when you need to execute tests for all database field types, utilize the following command.

# Import an 'xeeds' Table into the Database
php artisan xeed

# Drop the 'xeeds' Table from the Database
php artisan xeed drop

Utilize migration files for all database field types by referring to the following location database/*.sql these files are saved in the specified folder.

Use testorchestral/testbench

You can utilize testorchestral/testbench to execute tests. When running Laravel commands, the generated files are saved in the vendor/orchestra/testbench-core/laravel/database folder.

Resources

Laravel columns description for mysql:

| Available Column Types | Field | Type | Null | Key | Default | Extra | | ------------------------------------------------ | ------------------------ | --------------------------- | ---- | --- | ------- | -------------- | | id() | id | bigint unsigned | NO | PRI | | auto_increment | | bigInteger('big_integer') | big_integer | bigint | NO | | | | | binary('binary') | binary | blob | NO | | | | | boolean('boolean') | boolean | tinyint(1) | NO | | | | | char('char', length: 100) | char | char(100) | NO | | | | | dateTimeTz('date_time_tz', precision: 0) | date_time_tz | datetime | NO | | | | | dateTime('date_time', precision: 0) | date_time | datetime | NO | | | | | date('date') | date | date | NO | | | | | decimal('decimal', total: 8, places: 2) | decimal | decimal(8,2) | NO | | | | | double('double') | double | double | NO | | | | | enum('enum', ['easy', 'hard']) | enum | enum('easy','hard') | NO | | | | | float('float', precision: 53) | float | double | NO | | | | | foreignId('foreign_id') | foreign_id | bigint unsigned | NO | | | | | foreignUlid('foreign_ulid') | foreign_ulid | char(26) | NO | | | | | foreignUuid('foreign_uuid') | foreign_uuid | char(36) | NO | | | | | geometry('geometry', subtype: 'point', srid: 0) | geometry | point | NO | | | | | integer('integer') | integer | int | NO | | | | | ipAddress('ip_address') | ip_address | varchar(45) | NO | | | | | json('json') | json | json | NO | | | | | jsonb('jsonb') | jsonb | json | NO | | | | | longText('long_text'

Related Skills

View on GitHub
GitHub Stars87
CategoryData
Updated1mo ago
Forks8

Languages

PHP

Security Score

100/100

Audited on Feb 13, 2026

No findings