Skip to content

Commit 883ff76

Browse files
authored
Merge pull request #4651 from Laravel-Backpack/work-around-for-specific-crud-versions
Work around for specific PRO versions
2 parents f418447 + 86c0fda commit 883ff76

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

src/app/Library/CrudPanel/CrudPanel.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Backpack\CRUD\app\Library\CrudPanel\Traits\FakeFields;
1515
use Backpack\CRUD\app\Library\CrudPanel\Traits\Fields;
1616
use Backpack\CRUD\app\Library\CrudPanel\Traits\Filters;
17+
use Backpack\CRUD\app\Library\CrudPanel\Traits\HasViewNamespaces;
1718
use Backpack\CRUD\app\Library\CrudPanel\Traits\HeadingsAndTitles;
1819
use Backpack\CRUD\app\Library\CrudPanel\Traits\Input;
1920
use Backpack\CRUD\app\Library\CrudPanel\Traits\Macroable;
@@ -38,7 +39,7 @@
3839
class CrudPanel
3940
{
4041
// load all the default CrudPanel features
41-
use Create, Read, Search, Update, Delete, Input, Errors, Reorder, Access, Columns, Fields, Query, Buttons, AutoSet, FakeFields, FakeColumns, AutoFocus, Filters, Tabs, Views, Validation, HeadingsAndTitles, Operations, SaveActions, Settings, Relationships;
42+
use Create, Read, Search, Update, Delete, Input, Errors, Reorder, Access, Columns, Fields, Query, Buttons, AutoSet, FakeFields, FakeColumns, AutoFocus, Filters, Tabs, Views, Validation, HeadingsAndTitles, Operations, SaveActions, Settings, Relationships, HasViewNamespaces;
4243
// allow developers to add their own closures to this object
4344
use Macroable;
4445

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace Backpack\CRUD\app\Library\CrudPanel\Traits;
4+
5+
use Backpack\CRUD\ViewNamespaces;
6+
7+
trait HasViewNamespaces
8+
{
9+
/**
10+
* This file is only needed because we messed up version constrains from
11+
* 1.2 up to 1.2.6 of PRO version and any user that the license ended
12+
* in the middle of those versions was not able to update
13+
* Backpack/CRUD up from 5.3.6.
14+
*
15+
* This should be removed in the next major version.
16+
*/
17+
public function addViewNamespacesFor(string $domain, array $viewNamespaces)
18+
{
19+
ViewNamespaces::addFor($domain, $viewNamespaces);
20+
}
21+
22+
public function addViewNamespaceFor(string $domain, string $viewNamespace)
23+
{
24+
ViewNamespaces::addFor($domain, $viewNamespace);
25+
}
26+
}

0 commit comments

Comments
 (0)