PHPackages                             nikitanp/laravel-discourse - 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. [API Development](/categories/api)
4. /
5. nikitanp/laravel-discourse

ActiveLibrary[API Development](/categories/api)

nikitanp/laravel-discourse
==========================

PHP Discourse Forum API for the Laravel Framework

1.0.3(4y ago)5295GPL-3.0PHPPHP &gt;=7.2

Since Jul 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/nikitanp/laravel-discourse)[ Packagist](https://packagist.org/packages/nikitanp/laravel-discourse)[ RSS](/packages/nikitanp-laravel-discourse/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (6)Dependencies (3)Versions (11)Used By (0)

Discourse API Client and SSO for the Laravel Framework
======================================================

[](#discourse-api-client-and-sso-for-the-laravel-framework)

[![Latest Version on Packagist](https://camo.githubusercontent.com/339537223b764212744b23d9a611a06493ecd7af15598dca65c635cd03982374/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e696b6974616e702f6c61726176656c2d646973636f757273652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nikitanp/laravel-discourse)[![Total Downloads](https://camo.githubusercontent.com/77e77c26e041e4a58b31404d0cc731600334f469c43406f6662f35338e60a17b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e696b6974616e702f6c61726176656c2d646973636f757273652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nikitanp/laravel-discourse)

---

Version Compatibility
---------------------

[](#version-compatibility)

Laravel framework 6 and higher.

Getting Started
---------------

[](#getting-started)

Before going through the rest of this documentation, please take some time to read the [Discourse API Documentation](https://docs.discourse.org/). Not all of the API calls are documented, but it's a good place to start. Additional help with SSO: [https://meta.discourse.org](https://meta.discourse.org/c/dev/sso/24)

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

[](#installation)

```
composer require nikitanp/laravel-discourse

```

This package auto discovered by laravel!

You can optionally publish the config file with:

```
php artisan vendor:publish --provider="NikitaMikhno\LaravelDiscourse\DiscourseServiceProvider" --tag="config"
```

Configure Laravel Discourse API Library
=======================================

[](#configure-laravel-discourse-api-library)

Laravel Env
-----------

[](#laravel-env)

Set the API Token, Forum url and SSO Token in your .env:

```
DISCOURSE_URL=https://forum.url
DISCOURSE_SECRET={sso secret}
DISCOURSE_TOKEN={api token}
DISCOURSE_SSO_ENABLED=true/false

```

Discourse Env
-------------

[](#discourse-env)

**Enable SSO**Via UI: see: "{DISCOURSE\_URL}/admin/site\_settings/category/required?filter="

Via console:

```
cd /var/discourse
./launcher enter app
rails c
irb > SiteSetting.sso_secret = {config('discourse.secret')}
irb > SiteSetting.sso_url = {config('discourse.route')}
irb > SiteSetting.logout_redirect = {config('discourse.logout')}
irb > SiteSetting.enable_sso = true
irb > SiteSetting.enable_local_logins = false
irb > exit
exit
```

### Credits

[](#credits)

Forked from: [matthew-jensen/laravel-discourse-client](https://github.com/matthew-jensen/laravel-discourse).

SSO Helper Methods: [cviebrock/discourse-php](https://github.com/cviebrock/discourse-php/).

SSO Controller Methods: [spinen/laravel-discourse-sso](https://github.com/spinen/laravel-discourse-sso).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Every ~75 days

Recently: every ~0 days

Total

10

Last Release

1816d ago

Major Versions

0.0.6 → 1.0.02021-05-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c7928cc1c1e7f8b3839edd50df4871b3013eac6c5ac664d024e37594d93d48a?d=identicon)[Nikita\_NoMix](/maintainers/Nikita_NoMix)

---

Top Contributors

[![nikitanp](https://avatars.githubusercontent.com/u/19794930?v=4)](https://github.com/nikitanp "nikitanp (13 commits)")

###  Code Quality

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nikitanp-laravel-discourse/health.svg)

```
[![Health](https://phpackages.com/badges/nikitanp-laravel-discourse/health.svg)](https://phpackages.com/packages/nikitanp-laravel-discourse)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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