You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,15 +73,15 @@ In this new major release which supports the new mongodb PHP extension, we also
73
73
Please change all `Jenssegers\Mongodb\Model` references to `Jenssegers\Mongodb\Eloquent\Model` either at the top of your model files, or your registered alias.
74
74
75
75
```php
76
-
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
76
+
use Mubin\Mongodb\Eloquent\Model as Eloquent;
77
77
78
78
class User extends Eloquent {}
79
79
```
80
80
81
81
If you are using hybrid relations, your MySQL classes should now extend the original Eloquent model class `Illuminate\Database\Eloquent\Model` instead of the removed `Jenssegers\Eloquent\Model`. Instead use the new `Jenssegers\Mongodb\Eloquent\HybridRelations` trait. This should make things more clear as there is only one single model class in this package.
82
82
83
83
```php
84
-
use Jenssegers\Mongodb\Eloquent\HybridRelations;
84
+
use Mubin\Mongodb\Eloquent\HybridRelations;
85
85
86
86
class User extends Eloquent {
87
87
@@ -143,15 +143,15 @@ Eloquent
143
143
This package includes a MongoDB enabled Eloquent class that you can use to define models for corresponding collections.
144
144
145
145
```php
146
-
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
146
+
use Mubin\Mongodb\Eloquent\Model as Eloquent;
147
147
148
148
class User extends Eloquent {}
149
149
```
150
150
151
151
Note that we did not tell Eloquent which collection to use for the `User` model. Just like the original Eloquent, the lower-case, plural name of the class will be used as the table name unless another name is explicitly specified. You may specify a custom collection (alias for table) by defining a `collection` property on your model:
152
152
153
153
```php
154
-
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
154
+
use Mubin\Mongodb\Eloquent\Model as Eloquent;
155
155
156
156
class User extends Eloquent {
157
157
@@ -163,7 +163,7 @@ class User extends Eloquent {
163
163
**NOTE:** Eloquent will also assume that each collection has a primary key column named id. You may define a `primaryKey` property to override this convention. Likewise, you may define a `connection` property to override the name of the database connection that should be used when utilizing the model.
164
164
165
165
```php
166
-
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
When soft deleting a model, it is not actually removed from your database. Instead, a deleted_at timestamp is set on the record. To enable soft deletes for a model, apply the SoftDeletingTrait to the model:
421
421
422
422
```php
423
-
use Jenssegers\Mongodb\Eloquent\SoftDeletes;
423
+
use Mubin\Mongodb\Eloquent\SoftDeletes;
424
424
425
425
class User extends Eloquent {
426
426
@@ -553,7 +553,7 @@ Eloquent allows you to work with Carbon/DateTime objects instead of MongoDate ob
553
553
Example:
554
554
555
555
```php
556
-
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
556
+
use Mubin\Mongodb\Eloquent\Model as Eloquent;
557
557
558
558
class User extends Eloquent {
559
559
@@ -582,7 +582,7 @@ Supported relations are:
582
582
Example:
583
583
584
584
```php
585
-
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
585
+
use Mubin\Mongodb\Eloquent\Model as Eloquent;
586
586
587
587
class User extends Eloquent {
588
588
@@ -597,7 +597,7 @@ class User extends Eloquent {
597
597
And the inverse relation:
598
598
599
599
```php
600
-
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
600
+
use Mubin\Mongodb\Eloquent\Model as Eloquent;
601
601
602
602
class Item extends Eloquent {
603
603
@@ -612,7 +612,7 @@ class Item extends Eloquent {
612
612
The belongsToMany relation will not use a pivot "table", but will push id's to a __related_ids__ attribute instead. This makes the second parameter for the belongsToMany method useless. If you want to define custom keys for your relation, set it to `null`:
613
613
614
614
```php
615
-
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
615
+
use Mubin\Mongodb\Eloquent\Model as Eloquent;
616
616
617
617
class User extends Eloquent {
618
618
@@ -634,7 +634,7 @@ If you want to embed models, rather than referencing them, you can use the `embe
634
634
**REMEMBER**: these relations return Eloquent collections, they don't return query builder objects!
635
635
636
636
```php
637
-
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
637
+
use Mubin\Mongodb\Eloquent\Model as Eloquent;
638
638
639
639
class User extends Eloquent {
640
640
@@ -711,7 +711,7 @@ Embedded relations will return a Collection of embedded items instead of a query
711
711
The embedsOne relation is similar to the EmbedsMany relation, but only embeds a single model.
712
712
713
713
```php
714
-
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
714
+
use Mubin\Mongodb\Eloquent\Model as Eloquent;
715
715
716
716
class Book extends Eloquent {
717
717
@@ -764,7 +764,7 @@ If you're using a hybrid MongoDB and SQL setup, you're in luck! The model will a
764
764
Example SQL-based User model:
765
765
766
766
```php
767
-
use Jenssegers\Mongodb\Eloquent\HybridRelations;
767
+
use Mubin\Mongodb\Eloquent\HybridRelations;
768
768
769
769
class User extends Eloquent {
770
770
@@ -783,7 +783,7 @@ class User extends Eloquent {
783
783
And the Mongodb-based Message model:
784
784
785
785
```php
786
-
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
0 commit comments