Skip to content

Commit

Permalink
fix: Eventable array to string issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sankarsuda committed Apr 14, 2024
1 parent 9f8d10d commit a62bb36
Show file tree
Hide file tree
Showing 7 changed files with 425 additions and 418 deletions.
51 changes: 26 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,32 @@ $books = $books->few(['id', 'author.name']);

```

## Flatten Relations

Return single model with merged attributes from relations

```php

// except the relations from merge
$model = $model->flatten($except);

// Take some keys
$model = $model->some(['id']);

// Take except
$model = $model->except(['id']);

// Append keys to attributes
$model = $model->merge(['id' => 1]);

// Apped relation keys to attributes
$model = $model->concat(['relation.id']);

// combination of merge and contact
$model = $model->combine(['relation.id']);
```


### Sorting task

```html
Expand Down Expand Up @@ -415,31 +441,6 @@ Set the timestamps 'created_at`and`updated_at`for insert and`updated_at` for upd
</div>
```

## Flatten Relations

Return single model with merged attributes from relations

```php

// except the relations from merge
$model = $model->flatten($except);

// Take some keys
$model = $model->some(['id']);

// Take except
$model = $model->except(['id']);

// Append keys to attributes
$model = $model->merge(['id' => 1]);

// Apped relation keys to attributes
$model = $model->concat(['relation.id']);

// combination of merge and contact
$model = $model->combine(['relation.id']);
```

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
Loading

0 comments on commit a62bb36

Please sign in to comment.