-
app/Http/Controllers/PageHomeController.php
Open in GitHubuse App\Actions\PrepareStreams; use App\Models\Stream; use Illuminate\Contracts\View\View; class PageHomeController extends Controller { public function __invoke(PrepareStreams $prepareStreams): View { return view('pages.home', [ 'streamsByDate' => $prepareStreams->handle(Stream::approved()->upcoming()->get()), ]); } }
-
routes/web.php
Open in GitHubuse Illuminate\Support\Facades\Route; Route::get('/', PageHomeController::class) ->name('home');