osb/app/Http/Controllers/UserHomeController.php
2018-07-13 14:53:44 +10:00

30 lines
438 B
PHP

<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Auth;
class UserHomeController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function home()
{
switch (Auth::user()->role()) {
case 'Customer':
return View('home');
case 'Reseller':
break;
case 'Wholesaler':
break;
default:
abort(500,'Unknown role: ',Auth::user()->role());
}
}
}