Initial invoice rendering

This commit is contained in:
Deon George
2018-08-01 17:09:38 +10:00
parent 1cde2a888a
commit c444e1d218
16 changed files with 500 additions and 28 deletions

View File

@@ -3,6 +3,8 @@
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Auth;
use App\Models\Invoice;
use App\User;
class UserHomeController extends Controller
{
@@ -11,6 +13,11 @@ class UserHomeController extends Controller
$this->middleware('auth');
}
public function invoice(Invoice $o)
{
return View('invoice',['o'=>$o]);
}
public function home()
{
switch (Auth::user()->role()) {
@@ -41,4 +48,10 @@ class UserHomeController extends Controller
{
abort(307,sprintf('http://www.graytech.net.au/u/%s/%s/%s',$type,$action,$id));
}
public function User(User $o)
{
// @todo Check authorised to see this account.
return View('userhome',['o'=>$o]);
}
}