Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ for production use.
|-------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|----------------------------------------------------------------|
| [![Build Status](https://app.travis-ci.com/jason-napolitano/DatabaseFactory.svg?branch=master)](https://app.travis-ci.com/jason-napolitano/DatabaseFactory) | [View Here](https://databasefactory.github.io/framework/) | [View Here](https://github.com/DatabaseFactory/framework/wiki) |


```bash
$ composer require database-factory/framework
```

### License

© 2023 - **DatabaseFactory** and all related components are released under
Expand Down
39 changes: 20 additions & 19 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions src/Entity.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ class Entity
// ORM Plugins
use ORM\HasConfig;
use ORM\HasTable;
use ORM\HasWhere;
use ORM\HasFirst;
use ORM\HasJoin;
use ORM\HasFind;
use ORM\HasLast;
use ORM\HasLike;
use ORM\HasAll;
use ORM\HasNot;

/**
* ID of a record for updating
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/HasAll.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trait HasAll
{
public static function all(string $columns = '*'): Builder
{
return Facades\DB::table(static::table())->select($columns);
return Facades\DB::table(static::table())->select($columns)->toArray();
}
}
}
2 changes: 1 addition & 1 deletion src/ORM/HasFind.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ trait HasFind
{
public static function find(int $id, string $columns = '*')
{
return DB::table(static::table())->select($columns)->where('id', '=', $id);
return DB::table(static::table())->select($columns)->where('id', '=', $id)->toArray();
}
}
}
2 changes: 1 addition & 1 deletion src/ORM/HasFirst.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ trait HasFirst
{
public static function first(string $columns = '*')
{
return DB::table(static::table())->select($columns)->orderBy('id', 'ASC')->limit(1)->toArray();
return DB::table(static::table())->select($columns)->orderBy('id', 'ASC')->limit(1);
}
}
}
2 changes: 1 addition & 1 deletion src/ORM/HasJoin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ trait HasJoin
{
public static function join(string $table, array $on, string $columns = '*')
{
return DB::table(static::table())->join($table, $on, $columns);
return DB::table(static::table())->join($table, $on, $columns)->toArray();
}
}
}
2 changes: 1 addition & 1 deletion src/ORM/HasLike.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ trait HasLike
{
public static function like(string $field, string $pattern, string $columns = '*'): Builder
{
return DB::table(static::table())->select($columns)->like($field, $pattern);
return DB::table(static::table())->select($columns)->like($field, $pattern)->toArray();
}
}
}
2 changes: 1 addition & 1 deletion src/ORM/HasNot.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trait HasNot
{
public static function whereNot($key = null, $value = null, string $columns = '*')
{
return DB::table(static::table())->select($columns)->whereNot($key, $value);
return DB::table(static::table())->select($columns)->whereNot($key, $value)->toArray();
}
}
}
2 changes: 1 addition & 1 deletion src/ORM/HasWhere.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ trait HasWhere
{
public static function where($key, $is = null, $value = null, string $columns = '*')
{
return DB::table(static::table())->select($columns)->where($key, $is, $value);
return DB::table(static::table())->select($columns)->where($key, $is, $value)->toArray();
}
}
}