From bc8491b2572de0a115ed1b321288b42c7f272a6a Mon Sep 17 00:00:00 2001 From: Thomas Petracco <17140634+tompec@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:59:53 +0800 Subject: [PATCH 1/2] Fix code example --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0011ab1..3b34b9d 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,14 @@ Onboard::addStep('Complete Profile') ->link('/profile') ->cta('Complete') ->completeIf(function (User $model) { - return $user->profile->isComplete(); + return $model->profile->isComplete(); }); Onboard::addStep('Create Your First Post') ->link('/post/create') ->cta('Create Post') ->completeIf(function (User $model) { - return $user->posts->count() > 0; + return $model->posts->count() > 0; }); ``` @@ -105,14 +105,14 @@ class AppServiceProvider extends ServiceProvider * injection here to inject anything else as well. */ ->completeIf(function (User $model) { - return $user->profile->isComplete(); + return $model->profile->isComplete(); }); Onboard::addStep('Create Your First Post') ->link('/post/create') ->cta('Create Post') ->completeIf(function (User $model) { - return $user->posts->count() > 0; + return $model->posts->count() > 0; }); ``` From 9d549f529481d7a01e5892f44aa5ffe4936d76ba Mon Sep 17 00:00:00 2001 From: Freek Van der Herten Date: Mon, 20 Jun 2022 10:21:05 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3b34b9d..387779c 100644 --- a/README.md +++ b/README.md @@ -19,15 +19,15 @@ use Spatie\Onboard\Facades\Onboard; Onboard::addStep('Complete Profile') ->link('/profile') ->cta('Complete') - ->completeIf(function (User $model) { - return $model->profile->isComplete(); + ->completeIf(function (User $user) { + return $user->profile->isComplete(); }); Onboard::addStep('Create Your First Post') ->link('/post/create') ->cta('Create Post') - ->completeIf(function (User $model) { - return $model->posts->count() > 0; + ->completeIf(function (User $user) { + return $user->posts->count() > 0; }); ```