Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AVMG20 committed Jul 5, 2021
1 parent c0f9436 commit 7744449
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace App\Http\Controllers;

use App\Models\UsefulLink;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;

class HomeController extends Controller
{
Expand All @@ -18,15 +18,13 @@ public function index(Request $request)
{
$usage = 0;

foreach (Auth::user()->Servers as $server){
foreach (Auth::user()->servers as $server){
$usage += $server->product->price;
}

$useful_links = DB::table('useful_links')->get();

return view('home')->with([
'useage' => $usage,
'useful_links' => $useful_links
'useful_links' => UsefulLink::all()->sortBy('id')
]);
}
}

0 comments on commit 7744449

Please sign in to comment.