Clean up sql codes.

This commit is contained in:
James Cole
2015-03-20 22:39:07 +01:00
parent 5dc0677599
commit c259a46ed3
4 changed files with 45 additions and 17 deletions

View File

@@ -45,7 +45,7 @@ class Reminders
*/
public function handle($request, Closure $next)
{
if ($this->auth->check() && !$request->isJson()) {
if ($this->auth->check() && !$request->isXmlHttpRequest()) {
// do reminders stuff.
$piggyBanks = $this->auth->user()->piggyBanks()->where('remind_me', 1)->get();
$today = new Carbon;
@@ -85,7 +85,6 @@ class Reminders
View::share('reminders', $reminders);
}
return $next($request);
}
}