Skip to content

Commit a9f5117

Browse files
Merge pull request #29 from jason-napolitano/master
Minor changes
2 parents 0fe70cd + 8f7d75b commit a9f5117

File tree

10 files changed

+32
-34
lines changed

10 files changed

+32
-34
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ for production use.
1111
|-------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|----------------------------------------------------------------|
1212
| [![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) |
1313

14+
15+
```bash
16+
$ composer require database-factory/framework
17+
```
18+
1419
### License
1520

1621
© 2023 - **DatabaseFactory** and all related components are released under

composer.lock

Lines changed: 20 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Entity.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ class Entity
2323
// ORM Plugins
2424
use ORM\HasConfig;
2525
use ORM\HasTable;
26-
use ORM\HasWhere;
27-
use ORM\HasFirst;
28-
use ORM\HasJoin;
29-
use ORM\HasFind;
30-
use ORM\HasLast;
31-
use ORM\HasLike;
32-
use ORM\HasAll;
33-
use ORM\HasNot;
3426

3527
/**
3628
* ID of a record for updating

src/ORM/HasAll.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ trait HasAll
1919
{
2020
public static function all(string $columns = '*'): Builder
2121
{
22-
return Facades\DB::table(static::table())->select($columns);
22+
return Facades\DB::table(static::table())->select($columns)->toArray();
2323
}
2424
}
2525
}

src/ORM/HasFind.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ trait HasFind
1818
{
1919
public static function find(int $id, string $columns = '*')
2020
{
21-
return DB::table(static::table())->select($columns)->where('id', '=', $id);
21+
return DB::table(static::table())->select($columns)->where('id', '=', $id)->toArray();
2222
}
2323
}
2424
}

src/ORM/HasFirst.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ trait HasFirst
2020
{
2121
public static function first(string $columns = '*')
2222
{
23-
return DB::table(static::table())->select($columns)->orderBy('id', 'ASC')->limit(1)->toArray();
23+
return DB::table(static::table())->select($columns)->orderBy('id', 'ASC')->limit(1);
2424
}
2525
}
2626
}

src/ORM/HasJoin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ trait HasJoin
1818
{
1919
public static function join(string $table, array $on, string $columns = '*')
2020
{
21-
return DB::table(static::table())->join($table, $on, $columns);
21+
return DB::table(static::table())->join($table, $on, $columns)->toArray();
2222
}
2323
}
2424
}

src/ORM/HasLike.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ trait HasLike
2020
{
2121
public static function like(string $field, string $pattern, string $columns = '*'): Builder
2222
{
23-
return DB::table(static::table())->select($columns)->like($field, $pattern);
23+
return DB::table(static::table())->select($columns)->like($field, $pattern)->toArray();
2424
}
2525
}
2626
}

src/ORM/HasNot.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ trait HasNot
1919
{
2020
public static function whereNot($key = null, $value = null, string $columns = '*')
2121
{
22-
return DB::table(static::table())->select($columns)->whereNot($key, $value);
22+
return DB::table(static::table())->select($columns)->whereNot($key, $value)->toArray();
2323
}
2424
}
2525
}

src/ORM/HasWhere.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ trait HasWhere
2020
{
2121
public static function where($key, $is = null, $value = null, string $columns = '*')
2222
{
23-
return DB::table(static::table())->select($columns)->where($key, $is, $value);
23+
return DB::table(static::table())->select($columns)->where($key, $is, $value)->toArray();
2424
}
2525
}
2626
}

0 commit comments

Comments
 (0)