我是laravel 5的新手.我有一个仪表板页面和一个登录页面.无论何时我去localhost:8080/dashboard它总是重定向我localhost:8080/auth/login.
我希望在localhost:8080/dashboard没有先登录的情况下显示我的仪表板.这是我的代码VerifyCsfrToken
namespace App\Http\Middleware;
use Closure;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
class VerifyCsrfToken extends BaseVerifier {
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
protected $except_urls = [
'dashboard/dashboard',
];
public function handle($request, Closure $next)
{
$regex = '#' . implode('|', $this->except_urls) . '#';
if ($this->isReading($request) || $this->tokensMatch($request) || preg_match($regex, $request->path()))
{
return $this->addCookieToResponse($request, $next($request));
}
throw new TokenMismatchException;
return parent::handle($request, $next); …Run Code Online (Sandbox Code Playgroud) 我从数据库中获取此数据,12345123412但在我的页面中我需要将其显示为12345-1234-12.关于如何处理这个问题的任何想法?我正在努力做到这一点.split()