Laravel Social Network Tutorial: Packages and Architecture
Last updated: 2026-11-03
This Laravel social network tutorial shows the architecture you need and the real packages that cover each part: accounts, follows, likes, media, search, notifications and real-time chat. You can assemble a working prototype from these packages in a few weeks, but a production network with moderation, payments and mobile apps is a much longer project, so the last section helps you decide whether to build from packages or start from a script.
Everything below is based on Laravel 13 and package versions listed on Packagist as of November 3, 2026. Check each package page before you install it, because versions move quickly.
What does a Laravel social network need, layer by layer?
A Laravel social network needs seven layers: authentication, a social graph (follows or friends), content with media, a feed, search, notifications, and real-time messaging. Laravel itself covers most of the plumbing, and community packages fill the social-specific gaps.
Laravel 13 requires PHP 8.3 or later, according to the Laravel 13 release notes. Plan your server around that from day one.
| Layer | What it does | Laravel feature or package |
|---|---|---|
| Authentication and API tokens | Sign-up, login, tokens for a mobile app | Laravel Sanctum |
| Roles and permissions | Admins, moderators, members | spatie/laravel-permission |
| Social graph | Follow, unfollow, friend requests | overtrue/laravel-follow or multicaret/laravel-acquaintances |
| Reactions | Likes or emoji reactions on posts and comments | overtrue/laravel-like or cybercog/laravel-love |
| Media | Photos and video attached to posts | spatie/laravel-medialibrary, pbmedia/laravel-ffmpeg, Laravel filesystem (S3) |
| Search | Find people, posts and hashtags | Laravel Scout |
| Notifications and real time | Alerts, chat, live counters | Notifications, Broadcasting, Laravel Reverb |
| Background work | Fan-out, video encoding, emails | Queues and Horizon |
Which Laravel packages handle follows, likes and media?
For follows, overtrue/laravel-follow adds a simple follow and unfollow system, while multicaret/laravel-acquaintances adds friendships with groups plus likes, favorites, votes and ratings in one package. For likes, choose overtrue/laravel-like for a plain like button, or cybercog/laravel-love if you want several reaction types.
For media, spatie/laravel-medialibrary associates uploaded files with Eloquent models, such as a post or a profile. Pair it with pbmedia/laravel-ffmpeg to transcode video, and store files on S3-compatible storage through Laravel’s filesystem.
Package health matters more than features in a long project. As a rough signal, Packagist shows over 130 million total installs for spatie/laravel-permission and about 55 million for spatie/laravel-medialibrary, while the follow and like packages sit in the hundreds of thousands. Smaller packages can be fine, but check their release history and open issues before you depend on them.
- Check that the latest release supports your Laravel version.
- Check how quickly issues and security reports get answered.
- Check whether the package stores data in its own tables, which affects later migrations.
How do you build the news feed in a Laravel social network tutorial project?
The simplest feed is a query: select posts whose author is someone the current user follows, newest first, with pagination. This “fan-out on read” approach works well for a small network and needs no extra infrastructure.
As the network grows, that query gets slow for users who follow many accounts. The common fix is “fan-out on write”: when someone posts, a queued job copies a reference to the post into each follower’s feed table or Redis list.
- Create posts, comments and follows tables, and define the relationships with Eloquent relationships.
- Build the feed as a paginated query first, and use eager loading to avoid one query per post.
- Move heavy work, such as fan-out and video encoding, into queued jobs.
- Monitor those queues with Horizon, which gives you a dashboard and code-driven queue configuration.
- Add caching for counters (likes, comments, followers) so each page view doesn’t recount them.
- Add ranking later, after you have real usage data to tune it.
How do real-time chat and notifications work in Laravel?
Laravel sends notifications through channels such as mail, database and broadcast, and it pushes broadcast events to browsers and apps over WebSockets. Laravel Reverb is the first-party WebSocket server for this, described on Packagist as a real-time WebSocket communication backend for Laravel applications.
Reverb is a long-running process, so it needs a server where you can keep a process alive and restart it after deploys. The Reverb docs also show how to run it behind an Nginx reverse proxy. This is one reason shared hosting is a poor fit for a social network.
For browser push alerts, laravel-notification-channels/webpush adds a Web Push channel. Native mobile push needs a separate setup with Apple and Google services.
Should you build from packages or start from a social network script?
Build from packages if the social layer is a small part of a bigger custom product, or if learning the architecture is the goal. Start from a script if you need a full social network, with admin tools, moderation, payments and mobile apps, in weeks rather than months.
| Criteria | Build from Laravel packages | Start from a Laravel script |
|---|---|---|
| Time to a working network | Weeks for a prototype; months for production | Days to install and brand |
| Admin panel and moderation | You build it | Included, then customized |
| Mobile apps | Separate project | Depends on the script; some include apps |
| Code control | Full, and every line is yours to maintain | Full when source code is included |
| Upfront cost | Developer time | License fee plus customization time |
| Best for | Custom products and learning | Launching a branded network quickly |
Our earlier guides cover the script side in more depth: Laravel social network scripts and frameworks and what a $149 Laravel script actually buys.
How does ShaunSocial handle this stack?
ShaunSocial (shaunsocial.com) uses the same building blocks described above, already wired together. ShaunSocial is white-label social network software built on Laravel, with Flutter mobile apps for iOS and Android, full source code and no required ShaunSocial branding.
The backend is Laravel with a RESTful API, the web frontend uses Vue 3 and Tailwind CSS, and chat runs over WebSockets with Laravel Reverb or Pusher. It uses Redis for cache, FFmpeg for video and S3-compatible storage such as Amazon S3, Wasabi or Cloudflare R2.
- Server requirements: Linux, PHP 8.3 or later, MySQL 5.7+ or MariaDB 10.10+, per the system requirements docs.
- Real-time chat setup: see installing and running Laravel Reverb.
- Source code: not encrypted, so developers can modify it.
- Pricing as of November 3, 2026: Starter is $149 one-time for the web license on 1 domain, and Ultimate is $559 with the mobile apps. See pricing.
- Hosting: managed VPS plans start at $59 per month on the hosting page.
ShaunSocial is not the best fit if you only need a follow button inside an existing Laravel app. In that case, the packages above are lighter. It also isn’t ideal if you want no hosting work at all and no code access, where a fully hosted SaaS tool is simpler.
Frequently asked questions
Is Laravel good for building a social network?
Yes. Laravel includes authentication, queues, broadcasting, notifications and file storage, which are the core plumbing of a social network. Community packages on Packagist add follows, likes and media handling.
What PHP version does a Laravel 13 social network need?
Laravel 13 requires PHP 8.3 or later, according to the official release notes. Choose a host that lets you run that version and keep it updated.
Can I run a Laravel social network on shared hosting?
It is not recommended. Real-time chat with Laravel Reverb needs a long-running process, and video encoding with FFmpeg needs server access that shared hosting usually blocks. A VPS or managed server is the safer choice.
Which package should I use for followers in Laravel?
overtrue/laravel-follow is a focused follow and unfollow package. multicaret/laravel-acquaintances covers friendships, follows, likes and ratings together, which suits apps that need several social interactions.
How long does it take to build a social network with Laravel?
A basic prototype with posts, follows and a feed can take a few weeks for an experienced developer. A production network with moderation, payments, real-time chat and mobile apps usually takes months, which is why many teams start from a script.
Want to see a finished Laravel social network before you write your own? Try the ShaunSocial demo or start the 14-day free trial, no credit card needed.