1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 17:01:33 +02:00
invoiceninja/app/Http/Controllers/Auth/VendorContactLoginController.php

57 lines
1.3 KiB
PHP
Raw Normal View History

2022-06-14 14:18:20 +02:00
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Http\Controllers\Auth;
use App\Events\Contact\ContactLoggedIn;
use App\Http\Controllers\Controller;
use App\Http\ViewComposers\PortalComposer;
use App\Libraries\MultiDB;
use App\Models\Account;
use App\Models\ClientContact;
use App\Models\Company;
use App\Utils\Ninja;
use Auth;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Route;
class VendorContactLoginController extends Controller
{
use AuthenticatesUsers;
protected $redirectTo = '/vendor/purchase_orders';
public function __construct()
{
2022-06-14 14:54:31 +02:00
$this->middleware('guest:vendor', ['except' => ['logout']]);
2022-06-14 14:18:20 +02:00
}
public function catch()
{
2022-06-14 14:54:31 +02:00
$data = [
2022-06-14 14:54:31 +02:00
];
2022-06-14 14:18:20 +02:00
2022-06-14 14:54:31 +02:00
return $this->render('purchase_orders.catch');
2022-06-14 14:18:20 +02:00
}
public function logout()
{
Auth::guard('vendor')->logout();
request()->session()->invalidate();
2022-06-14 14:54:31 +02:00
return redirect('/vendors');
2022-06-14 14:18:20 +02:00
}
}