Skip to content

Commit f5138fd

Browse files
pxpmtabacitu
andauthored
Apply suggestions from code review
Co-authored-by: Cristian Tabacitu <[email protected]>
1 parent 4d565d7 commit f5138fd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/app/Exceptions/BackpackProRequiredException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function render($request)
1616
// 1 use the provided message in full
1717
switch ($this->getCode()) {
1818
case 0:
19-
$this->message = $this->message.' is a Backpack PRO feature. Please purchase and install <a href="https://backpackforlaravel.com/pricing">Backpack\PRO</a>.';
19+
$this->message = $this->message.' is a Backpack PRO feature. Please purchase and install the Backpack\PRO addon from backpackforlaravel.com';
2020
break;
2121
}
2222

src/app/Library/CrudPanel/Traits/Views.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public static function getFirstFieldView($viewPath, $viewNamespace = false)
311311

312312
// if no view exists, in any of the directories above... no bueno
313313
if (! backpack_pro()) {
314-
throw new BackpackProRequiredException('Cannot find the field view: '.$viewPath.'. Please check for typos. Alternatively, maybe you are trying to use a <a href="https://backpackforlaravel.com/products/pro-for-unlimited-projects" target="_blank">PRO field</a>?', 1);
314+
throw new BackpackProRequiredException('Cannot find the field view: '.$viewPath.'. Please check for typos.' . (backpack_pro() ? '' : ' If you are trying to use a PRO field, please first purchase and install the backpack/pro addon from backpackforlaravel.com'), 1);
315315
}
316316
abort(500, "Cannot find '{$viewPath}' field view in any of the regular locations.");
317317
}

src/app/Library/Widget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function getFinalViewPath()
146146
}
147147
// if no view exists, in any of the directories above... no bueno
148148
if (! backpack_pro()) {
149-
throw new BackpackProRequiredException('Cannot find the view for «'.$this->type.'» widget type. Please check for typos. Alternatively, maybe you are trying to use a <a href="https://backpackforlaravel.com/products/pro-for-unlimited-projects" target="_blank">PRO widget</a>?', 1);
149+
throw new BackpackProRequiredException('Cannot find the widget view: '.$viewPath.'. Please check for typos.' . (backpack_pro() ? '' : ' If you are trying to use a PRO widget, please first purchase and install the backpack/pro addon from backpackforlaravel.com'), 1);
150150
}
151151
abort(500, 'Cannot find the view for «'.$this->type.'» widget type. Please check for typos.');
152152
}

0 commit comments

Comments
 (0)