Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit b11dca6

Browse files
committed
Merge branch 'release/4.0.0'
2 parents fe32798 + 4465911 commit b11dca6

File tree

8 files changed

+398
-2441
lines changed

8 files changed

+398
-2441
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/vendor/
2-
.idea
2+
.idea
3+
composer.lock

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: php
22

3-
php: 7.2
3+
php: 7.3
44

55
before_script:
66
- composer self-update

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
# Changelog
2+
## v.4.0.0
3+
- update dependencies for Laravel and Lumen 8.x.x compatibility
4+
- remove unnecessary composer.lock file
5+
- add new functions
6+
* doesntHave($relation, $boolean, $callback)
7+
* orDoesntHave($relation)
8+
* hasMorph($relation, $types, $operator, $count, $boolean, $callback)
9+
* orHasMorph($relation, $types, $operator, $count)
10+
* doesntHaveMorph($relation, $types, $boolean, $callback)
11+
* orDoesntHaveMorph($relation, $types)
12+
* whereHasMorph($relation, $types, $callback, $operator, $count)
13+
* orWhereHasMorph($relation, $types, $callback, $operator, $count)
14+
* whereDoesntHaveMorph($relation, $types, $callback)
15+
* orWhereDoesntHaveMorph($relation, $types, $callback)
216
## v.3.0.7
317
- add missing applyCriteria() in chunk() function
418
## v.3.0.6

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ Framework | Package | Note
2424
5.8.x | ^1.x.x | No longer maintained.
2525
6.0.x | ^2.x.x |
2626
7.x.x | ^3.x.x |
27+
8.x.x | ^4.x.x |
2728
#### Lumen
2829
Framework | Package | Note
2930
:---------|:--------|:-----
3031
5.8.x | ^1.1.x | No longer maintained.
3132
6.0.x | ^2.x.x |
3233
7.x.x | ^3.x.x |
34+
8.x.x | ^4.x.x |
3335

3436
### Implementation
3537
To use Repositories, create repository class that:
@@ -58,25 +60,12 @@ class ExampleRepository extends CoreRepository implements ExampleRepositoryInter
5860
*/
5961
public function entity(): string
6062
{
61-
return ExampleInterface::class;
63+
return Example::class;
6264
}
6365

6466
}
6567
```
6668

67-
Interface and repository class must be bind in you app ServiceProvider:
68-
```php
69-
/**
70-
* Register any application services.
71-
*
72-
* @return void
73-
*/
74-
public function register()
75-
{
76-
$this->app->bind(ExampleRepositoryInterfaceclass, ExampleRepository::class);
77-
}
78-
```
79-
8069
### Using repositories
8170
To use Repository in controller or other class you can use dependency injection or Container. Below is sample code of
8271
using service in controller.
@@ -132,6 +121,16 @@ class ExampleController extends Controller {
132121
* whereDoesntHave($relation, $callback)
133122
* orWhereDoesntHave($relation, $callback)
134123
* withCount($relations)
124+
* doesntHave($relation, $boolean, $callback)
125+
* orDoesntHave($relation)
126+
* hasMorph($relation, $types, $operator, $count, $boolean, $callback)
127+
* orHasMorph($relation, $types, $operator, $count)
128+
* doesntHaveMorph($relation, $types, $boolean, $callback)
129+
* orDoesntHaveMorph($relation, $types)
130+
* whereHasMorph($relation, $types, $callback, $operator, $count)
131+
* orWhereHasMorph($relation, $types, $callback, $operator, $count)
132+
* whereDoesntHaveMorph($relation, $types, $callback)
133+
* orWhereDoesntHaveMorph($relation, $types, $callback)
135134

136135
##### Additional methods (Laravel only)
137136
* datatable() - return EloquentDataTable instance for records. In order to user with method,

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
"laravel"
1111
],
1212
"require": {
13-
"php": "^7.2",
13+
"php": "^7.3",
1414
"ext-json": "^1.5",
1515
"ext-libxml": "*",
1616
"ext-simplexml": "*",
17-
"illuminate/contracts": "^7.0",
18-
"illuminate/database": "^7.0",
19-
"illuminate/support": "^7.0",
20-
"illuminate/container": "^7.0"
17+
"illuminate/contracts": "^8.0",
18+
"illuminate/database": "^8.0",
19+
"illuminate/support": "^8.0",
20+
"illuminate/container": "^8.0"
2121
},
2222
"require-dev": {
23-
"phpunit/phpunit": "^8.0"
23+
"phpunit/phpunit": "^9.0"
2424
},
2525
"suggest": {
2626
"yajra/laravel-datatables-oracle": "This package is required if you want to use datatable() function in CoreRepository class implementation (only for Laravel framework)"

0 commit comments

Comments
 (0)