Support the ongoing development of Laravel.io →
posted 7 years ago

Hello,

I have an app that required auth to view pages. It is simple an route middleware group on all the pages

Route::group(['middleware' => ['auth']], function () {

What I would like to implement is page previews for each page where the user can see some of the information, kinda similar to how Facebook, Linkedin etc. do when you are not signed in/up.

What is the best way to achieve this ? I know I could remove the middleware group and check if the user is auth'd in the controller or routes but was wondering is there was a better way.

Thanks in advance.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

vool vool Joined 3 Mar 2014

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.