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

Sushi Laravel Package

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.

View on GitHub
Deep Wiki
Context7
v2.5.4

What's Changed

New Contributors

Full Changelog: https://github.com/calebporzio/sushi/compare/v2.5.3...v2.5.4

v2.5.3
v2.5.2

What's Changed

New Contributors

Full Changelog: https://github.com/calebporzio/sushi/compare/v2.5.1...v2.5.2

v2.5.0

What's Changed

New Contributors

Full Changelog: https://github.com/calebporzio/sushi/compare/v2.4.5...v2.5.0

v2.4.5

What's Changed

New Contributors

Full Changelog: https://github.com/calebporzio/sushi/compare/v2.4.4...v2.4.5

v2.4.4

Added support for Laravel 10

v2.4.0

Added

  • Support for Laravel 9
v2.3.1

Fixed

  • Changed "sushi." connection prefix for exists validation to "Some\Class\Name." prefix so this can be used with multiple sushi models #96
v2.3.0

Added

  • You can now use Laravel's exists validation rule with Sushi models with the sushi. connection prefix. #88
  • Add sushiShouldCache() and sushiCacheReferencePath() methods for caching ->getRows() datasets #94
  • Make chunk insert size configurable using new $sushiInsertChunkSize property #92

Fixed

  • Avoid error when creating database concurrently #93
v2.2.0

Added

  • Allow Sushi to work with empty data sets by specifying protected $schema property #84

Fixed

  • Use array_chunk for larger data sets #67
  • Fix checking and adding primary key #34
v2.1.1

Added

  • Support for PHP 8 #81
v2.1.0

Added

  • Support for Laravel 8.x
v2.0.0

Added

  • Made columns nullable by default
  • Added auto-detecting of column types: integer, float, datetime, string
  • Allow for a custom schema with $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)

v1.1.2
v1.1.1

Fixed

  • Default $timestamp property behavior.
v1.1.0

Added

  • Auto-add $table->timestamps() to the migration if public $timestamps = true, otherwise don't

Fixed

  • Instead of invalidating the cache if the file modified time of the sqlite db and the model file MATCH, only invalidate if the model file time is AHEAD of the cache. (this way you can modify the sqlite database if you want temporarily (mainly for demoing purposes))
v1.0.4

Fixed

  • There was an issue with duplicate keys when you include an "id" column in your $rows array.
v1.0.3

Added

  • Support for just using ->getRows() instead of the hardcoded $rows property.
v1.0.2

Added

  • Allow for configurable cache prefix config('sushi.cache-prefix', 'sushi') #20

Fixed

  • Honor $primaryKey model property #24
  • CI tests #25
v1.0.1

Fixed

  • Added "orchestra/testbench" to require-dev instead of require in composer.json
v1.0.0
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport