mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +01:00
client contact login
This commit is contained in:
parent
c705d3d409
commit
9731054125
@ -46,6 +46,10 @@ class ContactLoginController extends Controller
|
||||
MultiDB::findAndSetDbByCompanyKey($request->session()->get('company_key'));
|
||||
$company = Company::where('company_key', $request->input('company_key'))->first();
|
||||
}
|
||||
elseif($request->has('company_key')){
|
||||
MultiDB::findAndSetDbByCompanyKey($request->input('company_key'));
|
||||
$company = Company::where('company_key', $request->input('company_key'))->first();
|
||||
}
|
||||
|
||||
if ($company) {
|
||||
$account = $company->account;
|
||||
|
@ -18,8 +18,8 @@ use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('client', [ContactLoginController::class, 'showLoginForm'])->name('client.catchall')->middleware(['domain_db', 'contact_account','locale']); //catch all
|
||||
|
||||
Route::get('client/login', [ContactLoginController::class, 'showLoginForm'])->name('client.login')->middleware(['domain_db', 'contact_account','locale']);
|
||||
Route::post('client/login', [ContactLoginController::class, 'login'])->name('client.login.submit');
|
||||
Route::get('client/login/{company_key?}', [ContactLoginController::class, 'showLoginForm'])->name('client.login')->middleware(['domain_db', 'contact_account','locale']);
|
||||
Route::post('client/login/{company_key?}', [ContactLoginController::class, 'login'])->name('client.login.submit');
|
||||
|
||||
Route::get('client/register/{company_key?}', [ContactRegisterController::class, 'showRegisterForm'])->name('client.register')->middleware(['domain_db', 'contact_account', 'contact_register','locale']);
|
||||
Route::post('client/register/{company_key?}', [ContactRegisterController::class, 'register'])->middleware(['domain_db', 'contact_account', 'contact_register', 'locale', 'throttle:10,1']);
|
||||
|
Loading…
Reference in New Issue
Block a user