Skip to content

Commit

Permalink
Update Laravel links to version 10.x (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rattone authored Mar 3, 2024
1 parent 48c89b9 commit 1d2a679
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ Breadcrumbs::for('post', function (BreadcrumbTrail $trail, Post $post) {
});
```

The `$post` object (probably an Eloquent [Model](https://laravel.com/api/8.x/Illuminate/Database/Eloquent/Model.html),
The `$post` object (probably an Eloquent [Model](https://laravel.com/api/10.x/Illuminate/Database/Eloquent/Model.html),
but could be anything) would be passed in from the view:

```blade
Expand Down Expand Up @@ -348,7 +348,7 @@ you to make edits directly.

#### View data

The view will receive a [Collection](https://laravel.com/api/8.x/Illuminate/Support/Collection.html)
The view will receive a [Collection](https://laravel.com/api/10.x/Illuminate/Support/Collection.html)
called `$breadcrumbs`.

Each breadcrumb is an [object](https://www.php.net/manual/en/language.types.object.php) with the following keys:
Expand Down Expand Up @@ -460,7 +460,7 @@ Route::name('home')->get('/', 'HomeController@index');
Route::name('post')->get('/post/{id}', 'PostController@show');
```

For more details, see [Named Routes](https://laravel.com/docs/8.x/routing#named-routes) in the Laravel documentation.
For more details, see [Named Routes](https://laravel.com/docs/10.x/routing#named-routes) in the Laravel documentation.

### Name your breadcrumbs to match

Expand All @@ -485,7 +485,7 @@ Breadcrumbs::for('post', function (BreadcrumbTrail $trail, Post $post) {
});
```

To add breadcrumbs to a [custom 404 Not Found page](https://laravel.com/docs/8.x/errors#custom-http-error-pages), use
To add breadcrumbs to a [custom 404 Not Found page](https://laravel.com/docs/10.x/errors#custom-http-error-pages), use
the name `errors.404`:

```php
Expand Down Expand Up @@ -576,7 +576,7 @@ Breadcrumbs::for('post', function (BreadcrumbTrail $trail, Post $post) { // <--

This makes your code less verbose and more efficient by only loading the post from the database once.

For more details see [Route Model Binding](https://laravel.com/docs/8.x/routing#route-model-binding) in the Laravel
For more details see [Route Model Binding](https://laravel.com/docs/10.x/routing#route-model-binding) in the Laravel
documentation.

### Resourceful controllers
Expand Down Expand Up @@ -641,7 +641,7 @@ Breadcrumbs::for('photo.edit', function (BreadcrumbTrail $trail, Photo $photo) {
});
```

For more details see [Resource Controllers](https://laravel.com/docs/8.x/controllers#resource-controllers) in the
For more details see [Resource Controllers](https://laravel.com/docs/10.x/controllers#resource-controllers) in the
Laravel documentation.

(Related FAQ: [Why is there no Breadcrumbs::resource() method?](#why-is-there-no-breadcrumbsresource-method).)
Expand Down Expand Up @@ -742,7 +742,7 @@ Breadcrumbs::after(function (BreadcrumbTrail $trail) {
```

For more advanced filtering, use `Breadcrumbs::generate()` and Laravel's
[Collection class](https://laravel.com/api/8.x/Illuminate/Support/Collection.html) methods instead:
[Collection class](https://laravel.com/api/10.x/Illuminate/Support/Collection.html) methods instead:

```php
<?php
Expand Down Expand Up @@ -846,7 +846,7 @@ class MyServiceProvider extends ServiceProvider

### Dependency injection

You can use [dependency injection](https://laravel.com/docs/8.x/providers#the-boot-method) to access the `Manager`
You can use [dependency injection](https://laravel.com/docs/10.x/providers#the-boot-method) to access the `Manager`
instance if you prefer, instead of using the `Breadcrumbs::` facade:

```php
Expand Down Expand Up @@ -912,7 +912,7 @@ FAQ
### Why is there no `Breadcrumbs::resource()` method?

A few people have suggested adding `Breadcrumbs::resource()` to match
[`Route::resource()`](https://laravel.com/docs/8.x/controllers#resource-controllers), but no one has come up with a good
[`Route::resource()`](https://laravel.com/docs/10.x/controllers#resource-controllers), but no one has come up with a good
implementation that a) is flexible enough to deal with translations, nested resources, etc., and b) isn't overly complex
as a result.

Expand Down

0 comments on commit 1d2a679

Please sign in to comment.