calebporzio/sushi
Sushi adds an “array driver” to Eloquent: define a model with the Sushi trait and a $rows array, and query it like a real table (where, first, eager loading, relationships). Great for fixture data like states, roles, and settings—no DB setup needed.
Full Changelog: https://github.com/calebporzio/sushi/compare/v2.5.3...v2.5.4
Full Changelog: https://github.com/calebporzio/sushi/compare/v2.5.2...v2.5.3
Full Changelog: https://github.com/calebporzio/sushi/compare/v2.5.1...v2.5.2
Full Changelog: https://github.com/calebporzio/sushi/compare/v2.5.0...v2.5.1
Full Changelog: https://github.com/calebporzio/sushi/compare/v2.4.5...v2.5.0
Full Changelog: https://github.com/calebporzio/sushi/compare/v2.4.4...v2.4.5
Added support for Laravel 10
exists validation rule with Sushi models with the sushi. connection prefix. #88sushiShouldCache() and sushiCacheReferencePath() methods for caching ->getRows() datasets #94$sushiInsertChunkSize property #92protected $schema property #84array_chunk for larger data sets #67integer, float, datetime, string$schema property or getSchema function:class ModelWithCustomSchema extends Model
{
use \Sushi\Sushi;
protected $rows = [[
'string_int' => '123',
]];
protected $schema = [
'string_int' => 'integer',
];
}
(Now the $model->string_int will be an integer instead of a string)
$timestamp property behavior.$table->timestamps() to the migration if public $timestamps = true, otherwise don't->getRows() instead of the hardcoded $rows property.config('sushi.cache-prefix', 'sushi') #20$primaryKey model property #24composer.jsonHow can I help you explore Laravel packages today?