PHPackages                             robertboes/laravel-portal - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. robertboes/laravel-portal

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

robertboes/laravel-portal
=========================

Laravel Portal - Easily create single routes that serve guests and authenticated users

01PHP

Since Jul 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/RobertBoes/laravel-portal)[ Packagist](https://packagist.org/packages/robertboes/laravel-portal)[ RSS](/packages/robertboes-laravel-portal/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Portal
==============

[](#laravel-portal)

[![Portal Header](https://camo.githubusercontent.com/0298bc23b0c3ce520349891ef26c33d83fe281b28b3055473d83bdf69baf182e/68747470733a2f2f626f65732e696f2f6c61726176656c2d706f7274616c2f706f7274616c2d6865616465722d34782e706e67)](https://camo.githubusercontent.com/0298bc23b0c3ce520349891ef26c33d83fe281b28b3055473d83bdf69baf182e/68747470733a2f2f626f65732e696f2f6c61726176656c2d706f7274616c2f706f7274616c2d6865616465722d34782e706e67)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a5386d4e30635c8cfc7f85d578900f13f4d61c28835eb95e327847814f260074/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f62657274626f65732f6c61726176656c2d706f7274616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/robertboes/laravel-portal)[![Build Status](https://camo.githubusercontent.com/03fcc419974e7f047d7ab10d815dee6e1f78f4792fd9de13232afbc40657394a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f726f62657274626f65732f6c61726176656c2d706f7274616c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/robertboes/laravel-portal)[![Quality Score](https://camo.githubusercontent.com/01142d6dfd13f07d3a5347a060303cc60cc5f59f55443d90430ead6102300a63/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f726f62657274626f65732f6c61726176656c2d706f7274616c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/robertboes/laravel-portal)[![Total Downloads](https://camo.githubusercontent.com/93455fb0481cb630e08cffbcfc884781f6d5bd9a98ba161c61db553446ec5e6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726f62657274626f65732f6c61726176656c2d706f7274616c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/robertboes/laravel-portal)

Easily create single routes that serve guests and authenticated users.

Why this pacakge?
-----------------

[](#why-this-pacakge)

Imagine a route/page you want to be visible by guests and users. Normally you'll create a route, for example `Route::get('/', AppController::class)`, in this controller you'd do a check to see if the user is authenticated or not. Your controller might look something like this:

```
