Support the ongoing development of Laravel.io →
posted 9 years ago
Views Testing

Hi there, I'm trying to develop a small project with laravel.

I create the project with composer, and a home page from master template blade. I config the route:

Route::get('/', function () {

$categories = \App\Category::all();

$articles = \App\Article::with('categories', 'user')->where('published_at', '<=', 'NOW()')->where('is_published', '=', true)->orderBy('published_at', 'DESC')->paginate(5); 

return view('frontend.home', ['articles' => $articles, 'categories' => $categories]); 

});

If I launch the browser localhost/blog (<--the name of my project)

I see only the files in filesystem.

I use xamp on mac

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Xmac xmac Joined 28 Jan 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.