github calebporzio/sushi v2.0.0

latest releases: v2.5.2, v2.5.1, v2.5.0...
4 years ago

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)

Don't miss a new sushi release

NewReleases is sending notifications on new releases.