but the url::to does not work its a crud and im trying to go bk to the index of the crud
Assistant
It looks like you're trying to generate a "Go Back" link in Yii2, but the Url::to(['admins-users']) isn't working as expected. The 'admins-users' route looks suspiciously like it's not properly referencing a controller/action.
Here are some suggestions to fix it:
1. Check your route syntax
The parameter you give Url::to() should be an array with the controller and action, for example:
Url::to(['admins-users/index'])
or if you are pointing to the index action of a controller named AdminsUsersController, the route should be:
Url::to(['admins-users/index'])
Make sure the route matches your controller ID and action ID exactly.
2. Use Url::toRoute()
Sometimes Url::toRoute() is better suited to generate routes from an array:
Url::toRoute(['admins-users/index'])
3. Use Html::a() directly with route array
You can simplify by putting the route directly into Html::a(), since it accepts both string and array for URLs: