Moved site controllers to subfolder Website

This commit is contained in:
amikhaylov
2026-05-19 18:18:20 +03:00
parent 08cb7ef9c0
commit 50ce65cc46
9 changed files with 26 additions and 16 deletions
@@ -0,0 +1,27 @@
<?php
namespace App\Http\Controllers\Website;
use App\Http\Controllers\Controller;
use App\Models\Loaders\NewsLoader;
use App\Views\NewsView;
class NewsController extends Controller
{
public function __construct(
private NewsLoader $newsLoader,
private NewsView $view,
) {
$this->addCssFile('news.css');
}
public function index()
{
$news = $this->newsLoader->getNews();
$this->view->prepareData($news);
return $this->render('news')
->with(compact('news'));
}
}