Skip to content

Commit a2e8aa4

Browse files
committed
fix readme
1 parent 0dd47a2 commit a2e8aa4

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

readme.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -468,16 +468,6 @@ $post->title = 'New Post Title';
468468
$post->save();
469469
```
470470

471-
##### Mass Updates
472-
473-
Updates can also be performed against any number of models that match a given query. In this example, all posts that are active and have a views lower than 5 will be marked as archived:
474-
475-
```php
476-
App\post::where('active', 1)
477-
->where('views', "<", 5)
478-
->update(['archived' => 1]);
479-
```
480-
481471
##### Deleting Models
482472

483473
To delete a model, call the `delete()` method on a model instance:
@@ -488,14 +478,6 @@ $post = App\Post::find(1);
488478
$post->delete();
489479
```
490480

491-
##### Deleting Models By Query
492-
493-
Of course, you may also run a delete statement on a set of models. In this example, we will delete all posts that are marked as inactive. Like mass updates:
494-
495-
```php
496-
$deletedDocuments = App\Post::where('active', 0)->delete();
497-
```
498-
499481
##### Query Scopes
500482

501483
Scopes allow you to define common sets of constraints that you may easily re-use throughout your application. For example, you may need to frequently retrieve all posts that are considered "popular". To define a scope, simply prefix an Eloquent model method with scope.

0 commit comments

Comments
 (0)