Skip to content

Commit

Permalink
Removed the dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
petaki committed Feb 18, 2018
1 parent b365219 commit 88e9ba2
Show file tree
Hide file tree
Showing 172 changed files with 1,539 additions and 4,542 deletions.
23 changes: 1 addition & 22 deletions app/Auth/KoodilabUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Koodilab\Auth;

use Illuminate\Auth\EloquentUserProvider;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Str;

Expand Down Expand Up @@ -59,31 +58,11 @@ public function retrieveByCredentials(array $credentials)
$query->where('is_enabled', true);

foreach ($credentials as $key => $value) {
if (! Str::contains($key, ['username_or_email', 'is_enabled', 'password', 'ability'])) {
if (! Str::contains($key, ['username_or_email', 'is_enabled', 'password'])) {
$query->where($key, $value);
}
}

return $query->first();
}

/**
* {@inheritdoc}
*
* @param \Koodilab\Models\User $user
*/
public function validateCredentials(Authenticatable $user, array $credentials)
{
$plain = $credentials['password'];

if (! $this->hasher->check($plain, $user->getAuthPassword())) {
return false;
}

if (! empty($credentials['ability']) && $user->cannot($credentials['ability'])) {
return false;
}

return true;
}
}
14 changes: 0 additions & 14 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,4 @@ public function render($request, Exception $exception)
{
return parent::render($request, $exception);
}

/**
* {@inheritdoc}
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
return $request->expectsJson()
? response()->json(['message' => 'Unauthenticated.'], 401)
: redirect()->guest(route(
$request->is('admin*')
? 'admin_login'
: 'login'
));
}
}
117 changes: 0 additions & 117 deletions app/Http/Controllers/Admin/HomeController.php

This file was deleted.

78 changes: 0 additions & 78 deletions app/Http/Controllers/Admin/LoginController.php

This file was deleted.

49 changes: 0 additions & 49 deletions app/Http/Controllers/Admin/ProfileController.php

This file was deleted.

55 changes: 0 additions & 55 deletions app/Http/Controllers/Admin/SettingController.php

This file was deleted.

Loading

0 comments on commit 88e9ba2

Please sign in to comment.