Updates to login home
This commit is contained in:
@@ -44,7 +44,7 @@ class AdminHomeController extends Controller
|
||||
try {
|
||||
if ($key == 'site_logo' AND $value instanceof UploadedFile)
|
||||
{
|
||||
$path = $value->storePubliclyAs('site/'.config('SITE_SETUP')->id,$value->getClientOriginalName());
|
||||
$path = $value->storeAs('site/'.config('SITE_SETUP')->id,$value->getClientOriginalName(),'public');
|
||||
|
||||
SiteDetails::updateOrCreate([
|
||||
'site_id'=>config('SITE_SETUP')->id,
|
||||
|
@@ -6,13 +6,18 @@ use Auth;
|
||||
|
||||
class ResellerServicesController extends Controller
|
||||
{
|
||||
public function accounts()
|
||||
{
|
||||
return ['data'=>Auth::user()->all_accounts()->values()];
|
||||
}
|
||||
|
||||
public function agents()
|
||||
{
|
||||
return ['data'=>Auth::user()->all_agents()->values()];
|
||||
}
|
||||
|
||||
public function accounts()
|
||||
public function clients()
|
||||
{
|
||||
return ['data'=>Auth::user()->all_accounts()->values()];
|
||||
return ['data'=>Auth::user()->all_clients()->values()];
|
||||
}
|
||||
}
|
@@ -16,25 +16,25 @@ class UserHomeController extends Controller
|
||||
|
||||
public function invoice(Invoice $o)
|
||||
{
|
||||
return View('invoice',['o'=>$o]);
|
||||
return View('u.invoice',['o'=>$o]);
|
||||
}
|
||||
|
||||
public function invoice_pdf(Invoice $o)
|
||||
{
|
||||
return PDF::loadView('invoice', ['o'=>$o])->stream(sprintf('%s.pdf',$o->invoice_account_id));
|
||||
return PDF::loadView('u.invoice', ['o'=>$o])->stream(sprintf('%s.pdf',$o->invoice_account_id));
|
||||
}
|
||||
|
||||
public function home()
|
||||
{
|
||||
switch (Auth::user()->role()) {
|
||||
case 'customer':
|
||||
return View('userhome',['o'=>Auth::user()]);
|
||||
return View('u.home',['o'=>Auth::user()]);
|
||||
|
||||
case 'reseller':
|
||||
return View('resellerhome',['o'=>Auth::user()]);
|
||||
return View('r.home',['o'=>Auth::user()]);
|
||||
|
||||
case 'wholesaler':
|
||||
return View('resellerhome',['o'=>Auth::user()]);
|
||||
return View('r.home',['o'=>Auth::user()]);
|
||||
|
||||
default:
|
||||
abort(500,'Unknown role: '.Auth::user()->role());
|
||||
@@ -58,6 +58,6 @@ class UserHomeController extends Controller
|
||||
public function User(User $o)
|
||||
{
|
||||
// @todo Check authorised to see this account.
|
||||
return View('userhome',['o'=>$o]);
|
||||
return View('u.home',['o'=>$o]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user