PHPackages                             jeroen-g/guestpass - 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. jeroen-g/guestpass

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

jeroen-g/guestpass
==================

Flickr-like Guest Pass system for Laravel.

v1.0(8y ago)2151EUPL-1.1PHPPHP ~5.6|~7.0

Since Aug 16Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Jeroen-G/GuestPass)[ Packagist](https://packagist.org/packages/jeroen-g/guestpass)[ Docs](https://github.com/Jeroen-G/GuestPass)[ RSS](/packages/jeroen-g-guestpass/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

GuestPass for Laravel
=====================

[](#guestpass-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/45b7024ad68bdd0bef0f86ecad83fe01c1d65d1aa328af57fd8109b44e829594/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4a65726f656e2d472f4775657374506173732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Jeroen-G/GuestPass)[![Build Status](https://camo.githubusercontent.com/7f3e22c340f701c6cad59ce88c79afdbf6057e45234751917e21fbefa213e90a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4a65726f656e2d472f4775657374506173732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Jeroen-G/GuestPass)[![Quality Score](https://camo.githubusercontent.com/1782fe5560f8682c5cf2a2892850cd236ed0dd1222d5dec668a4e8666e980e1d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f4a65726f656e2d472f4775657374506173732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Jeroen-G/GuestPass)

Installation
------------

[](#installation)

Via Composer

```
$ composer require jeroen-g/guestpass
```

If you run Laravel 5.5, the service provider and facade are autodiscovered. If not then add them manually:

```
JeroenG\GuestPass\GuestPassServiceProvider::class,
// ...
'GuestPass' => JeroenG\GuestPass\GuestPassFacade::class,
```

Usage
-----

[](#usage)

To use Guest Passes, you will need two models: one that is the owner granting guest access (typically a user) and another that is the object to which access is being granted. In the examples below, a photo is used for this.

### Creating new Guest Passes

[](#creating-new-guest-passes)

Requires the owner and object models.

```
GuestPass::create($user, $photo);
```

Returns true if successfull, false otherwise.

### Retrieving Guest Pass data

[](#retrieving-guest-pass-data)

A Guest Pass contains the following data: `owner_model`, `owner_id`; `object_model`, `object_id`; `key` (unique); `view` (nullable).

#### Getting all keys of the owner

[](#getting-all-keys-of-the-owner)

Requires the owner model.

```
GuestPass::getKeysOf($user);
```

Returns a collection of all Guest Pass keys and their corresponding data is attached as well.

#### Finding a Guest Pass for corresponding owner and object

[](#finding-a-guest-pass-for-corresponding-owner-and-object)

Requires the owner and object model.

```
GuestPass::findGuestPass($user, $photo);
```

Returns an Eloquent model (or throws an exception).

#### Get one specific Guest Pass by its key

[](#get-one-specific-guest-pass-by-its-key)

Requires the key (string).

```
GuestPass::getGuestPass($key);
```

Returns an Eloquent model (or throws an exception).

### Checking ownership

[](#checking-ownership)

Requires the owner and Guest Pass models.

```
GuestPass::isOwner($user, $guestpass);
```

Returns true or false.

### Access controller

[](#access-controller)

The package ships with a controller that checks for the `/gp/{owner id}/{key}` route and when valid it returns the view (404 otherwise). Each view is passed the object and the Guest Pass models. The views will be sought in the `resources/views/guests/` directory.

### Custom views

[](#custom-views)

When creating a Guest Pass it is possible to pass a custom view as the third parameter

```
GuestPass::create($user, $photo, 'album');
```

In this case, the access controller will not use `photo.blade.php` (which would be the default) but `album.blade.php` but the directory remains the same and it is not necessary to add the file extension.

Changelog
---------

[](#changelog)

Please see [changelog.md](changelog.md) for what has changed recently.

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details.

Credits
-------

[](#credits)

- [JeroenG](https://github.com/:author_username)
- [All Contributors](../../contributors)

License
-------

[](#license)

The EU Public License. Please see [license.md](license.md) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3240d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/41971?v=4)[Jeroen Goudsmit](/maintainers/JeroenG)[@jeroeng](https://github.com/jeroeng)

---

Top Contributors

[![Jeroen-G](https://avatars.githubusercontent.com/u/1116853?v=4)](https://github.com/Jeroen-G "Jeroen-G (6 commits)")[![LasseRafn](https://avatars.githubusercontent.com/u/2689341?v=4)](https://github.com/LasseRafn "LasseRafn (1 commits)")

---

Tags

guestguestpasslaravelJeroenGguestpassGuest Pass

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jeroen-g-guestpass/health.svg)

```
[![Health](https://phpackages.com/badges/jeroen-g-guestpass/health.svg)](https://phpackages.com/packages/jeroen-g-guestpass)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6783.6k5](/packages/hasinhayder-tyro)[offload-project/laravel-invite-only

A Laravel package for managing user invitations with polymorphic relationships, token-based access, scheduled reminders, and event-driven notifications.

729.3k2](/packages/offload-project-laravel-invite-only)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1542.1k4](/packages/masterix21-laravel-licensing)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2013.2k](/packages/alajusticia-laravel-logins)[amdadulhaq/guard-laravel

Guard is Role and Permission management system for Laravel

135.5k](/packages/amdadulhaq-guard-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
