File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
src/app/Library/CrudPanel Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,11 @@ public function getSqlDriverList()
209209 */
210210 public function setRoute ($ route )
211211 {
212+ // if the route is a full URL, strip the domain
213+ if (str_starts_with ($ route , url ('/ ' ))) {
214+ $ route = substr ($ route , strlen (url ('/ ' )));
215+ }
216+
212217 $ this ->route = ltrim ($ route , '/ ' );
213218 }
214219
Original file line number Diff line number Diff line change @@ -36,12 +36,9 @@ public function testSetRoute()
3636 $ crudPanel = app ('crud ' );
3737 $ crudPanel ->setRoute (backpack_url ('users ' ));
3838 $ crudPanel ->setEntityNameStrings ('singular ' , 'plural ' );
39- $ this ->assertEquals (route ( ' users.index ' ) , $ crudPanel ->getRoute ());
39+ $ this ->assertEquals (config ( ' backpack.base.route_prefix ' ). ' /users ' , $ crudPanel ->getRoute ());
4040 }
4141
42- /**
43- * @group fail
44- */
4542 public function testCrudRequestUpdatesOnEachRequest ()
4643 {
4744 // create a first request
You can’t perform that action at this time.
0 commit comments