Skip to content

Commit

Permalink
DOCSP-43539: v5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
rustagir committed Sep 13, 2024
1 parent 3ac7955 commit efe3918
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion docs/compatibility.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Compatibility
:class: singlecol

.. meta::
:keywords: laravel 9, laravel 10, laravel 11, 4.0, 4.1, 4.2
:keywords: laravel 9, laravel 10, laravel 11, 4.0, 4.1, 4.2, 5.0

Laravel Compatibility
---------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/includes/framework-compatibility-laravel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- Laravel 10.x
- Laravel 9.x

* - 4.2 to 4.8
* - 4.2 to 5.0
- ✓
- ✓
-
Expand Down
58 changes: 29 additions & 29 deletions docs/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,41 +124,41 @@ This library version introduces the following breaking changes:
older versions compared to v5.0:

.. code-block:: php
:emphasize-lines: 10-11

use MongoDB\Laravel\Eloquent\Model;

class User extends Model
{
protected $keyType = 'string';

// older versions
protected $collection = 'app_user';

// v5.0
protected $table = 'app_user';

...
}
:emphasize-lines: 10-11
use MongoDB\Laravel\Eloquent\Model;
class User extends Model
{
protected $keyType = 'string';
// older versions
protected $collection = 'app_user';
// v5.0
protected $table = 'app_user';
...
}

This release also modifies the associated ``DB`` and ``Schema`` methods for
accessing a MongoDB collection. The following code shows how to access the
``app_user`` collection in older versions compared to v5.0:

.. code-block:: php
:emphasize-lines: 9-11

use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
use MongoDB\Laravel\Schema\Blueprint;

// older versions
Schema::collection('app_user', function (Blueprint $collection) { ... });
DB::collection('app_user')->find($id);

// v5.0
Schema::table('app_user', function (Blueprint $table) { ... });
DB::table('app_user')->find($id);
:emphasize-lines: 9-11
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
use MongoDB\Laravel\Schema\Blueprint;
// older versions
Schema::collection('app_user', function (Blueprint $collection) { ... });
DB::collection('app_user')->find($id);
// v5.0
Schema::table('app_user', function (Blueprint $table) { ... });
DB::table('app_user')->find($id);

.. _laravel-breaking-changes-v4.x:

Expand Down

0 comments on commit efe3918

Please sign in to comment.