Skip to content

Commit c7e623f

Browse files
committed
modification de la orute controller
1 parent 28d1971 commit c7e623f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/Http/Controllers/Cpanel/DashboardController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class DashboardController extends Controller
1111
{
12-
public function home()
12+
public function __invoke()
1313
{
1414
$users = Cache::remember('new-members', now()->addHour(), fn () => User::verifiedUsers()->latest()->limit(15)->get());
1515
$latestArticles = Cache::remember('last-posts', now()->addHour(), fn () => Article::latest()->limit(2)->get());

routes/cpanel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
use Illuminate\Support\Facades\Route;
55

66
Route::redirect('/', 'cpanel/home');
7-
Route::get('/home', [DashboardController::class, 'home'])->name('home');
7+
Route::get('/home', DashboardController::class)->name('home');

0 commit comments

Comments
 (0)