mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #7507 from CirkaN/Cirkovic/INA-7
INA-7 | Add Vendor guard
This commit is contained in:
commit
7658c66953
@ -39,6 +39,12 @@ class RedirectIfAuthenticated
|
|||||||
// return redirect()->route('dashboard.index');
|
// return redirect()->route('dashboard.index');
|
||||||
// }
|
// }
|
||||||
break;
|
break;
|
||||||
|
case 'vendor':
|
||||||
|
if (Auth::guard($guard)->check()) {
|
||||||
|
//TODO create routes for vendor
|
||||||
|
// return redirect()->route('vendor.dashboard');
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Auth::logout();
|
Auth::logout();
|
||||||
// if (Auth::guard($guard)->check()) {
|
// if (Auth::guard($guard)->check()) {
|
||||||
|
@ -121,4 +121,12 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
->namespace($this->namespace)
|
->namespace($this->namespace)
|
||||||
->group(base_path('routes/shop.php'));
|
->group(base_path('routes/shop.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function mapVendorsApiRoutes()
|
||||||
|
{
|
||||||
|
Route::prefix('')
|
||||||
|
->middleware('vendor')
|
||||||
|
->namespace($this->namespace)
|
||||||
|
->group(base_path('routes/vendor.php'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,10 @@ return [
|
|||||||
'driver' => 'session',
|
'driver' => 'session',
|
||||||
'provider' => 'contacts',
|
'provider' => 'contacts',
|
||||||
],
|
],
|
||||||
|
'vendor' => [
|
||||||
|
'driver' => 'session',
|
||||||
|
'provider' => 'vendors',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -85,6 +89,11 @@ return [
|
|||||||
'driver' => 'eloquent',
|
'driver' => 'eloquent',
|
||||||
'model' => App\Models\ClientContact::class,
|
'model' => App\Models\ClientContact::class,
|
||||||
],
|
],
|
||||||
|
'vendors' => [
|
||||||
|
'driver' => 'eloquent',
|
||||||
|
'model' => App\Models\VendorContact::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
// 'users' => [
|
// 'users' => [
|
||||||
// 'driver' => 'database',
|
// 'driver' => 'database',
|
||||||
@ -120,6 +129,11 @@ return [
|
|||||||
'table' => 'password_resets',
|
'table' => 'password_resets',
|
||||||
'expire' => 60,
|
'expire' => 60,
|
||||||
],
|
],
|
||||||
|
'vendors' => [
|
||||||
|
'provider' => 'vendors',
|
||||||
|
'table' => 'password_resets',
|
||||||
|
'expire' => 60,
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
15
routes/vendor.php
Normal file
15
routes/vendor.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| API Routes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here is where you can register API routes for your application. These
|
||||||
|
| routes are loaded by the RouteServiceProvider within a group which
|
||||||
|
| is assigned the "api" middleware group. Enjoy building your API!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user