added date class

This commit is contained in:
denisdulici
2020-03-25 20:21:42 +03:00
parent ee6041ecd1
commit 201a3696a4
13 changed files with 75 additions and 15 deletions

View File

@@ -2,7 +2,7 @@
namespace App\Listeners\Auth;
use Date;
use App\Utilities\Date;
use Illuminate\Auth\Events\Login as ILogin;
class Login
@@ -18,13 +18,13 @@ class Login
{
// Get first company
$company = $event->user->companies()->enabled()->first();
// Logout if no company assigned
if (!$company) {
app('App\Http\Controllers\Auth\Login')->logout();
flash(trans('auth.error.no_company'))->error();
return;
}