Skip to content

Commit

Permalink
Tasks Completed
Browse files Browse the repository at this point in the history
  • Loading branch information
ruwanb committed Nov 14, 2024
1 parent 4b534fd commit 6644de7
Show file tree
Hide file tree
Showing 12 changed files with 5,906 additions and 3,223 deletions.
4 changes: 3 additions & 1 deletion app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ public function users()
{
$usersCount = User::count();

return view('users');
return view('users', [
'usersCount' => $usersCount
]);
}

// Task 2. Change the View code so alert would not show on the screen
Expand Down
18 changes: 18 additions & 0 deletions app/View/Components/MainLayout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace App\View\Components;

use Illuminate\View\Component;

class MainLayout extends Component
{
/**
* Get the view / contents that represents the component.
*
* @return \Illuminate\View\View
*/
public function render()
{
return view('layouts.main');
}
}
Loading

0 comments on commit 6644de7

Please sign in to comment.