Closed gitchak closed 4 years ago
What is your actual route? admin/*
won’t match admin
- try admin*
instead
my actual route is "http://localhost:8080/admin". admin* gives me a error "VENDORPATH\myth\auth\src\Filters\LoginFilter.php at line 8"
You didn’t share the error message, but it sounds like the corrected route is actually running the filter now. My guess is that you are on an outdated version of the framework that is missing the FilterInterface
. Try updating and running again.
I'm on Ci - 4.0.4. Did run update from composer. Below is the full error.
ErrorException #64 Declaration of Myth\Auth\Filters\LoginFilter::before(CodeIgniter\HTTP\RequestInterface $request) must be compatible with CodeIgniter\Filters\FilterInterface::before(CodeIgniter\HTTP\RequestInterface $request, $arguments = NULL)
much appreciate your support MGatner.
Ah, yes. The issue wasn’t the framework, your Myth:Auth is outdated. See this issue: https://github.com/lonnieezell/myth-auth/issues/253
"dev-develop" update did the trick. Thank you so much MGatner.
All works except the filters. I add the below.
public filters = [ 'login' => ['before' => ['admin/*']], ];
Now my "admin" controller loads with out getting redirected to login. If do a manual check from the controller as below it works.
if(!logged_in()){ return redirect('login'); }
Would love to get the filters working. Please help.