elitedevsquad/sidecar-laravel
Larablocks Analysis
elitedevsquad/sidecar-laravel works with Laravel 11, 12 and 13 (latest release v3.7.0, Nov 25, 2026).
Recommendation checks
Solid choiceSolid choice: maintained and up to date, meets 2 of 4 checks; below the bar for Recommended on use.
- Works with Laravel 13, the current version
- Released in the last 12 months (Nov 25, 2026)
- 9,072 downloads a month (needs 10,000)
- 8 GitHub stars (needs 100)
State
Actively maintained- Last stable release: Nov 25, 2026.
- 21 releases in the last 12 months.
- First released: Sep 5, 2025.
- Monthly downloads: 9,072.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 30, 2026.
| Install | |
|---|---|
composer require elitedevsquad/sidecar-laravel |
|
| Latest Version: | v3.7.0 |
| PHP: | ^8.2 |
| Laravel: | 11 · 12 · 13 |
| License: | MIT |
| Last Updated: | Nov 27, 2026 |
| Links: | GitHub · Packagist |
DevSquad Sidecar
A Laravel library that lets developers and QA test Laravel apps directly from the browser — run Tinker code, artisan commands, manipulate the fake clock, and impersonate users.
Requirements: PHP ^8.2, Laravel ^11
Install
Run from inside your Laravel project root:
bash <(curl -fsSL https://raw.githubusercontent.com/elitedevsquad/sidecar-laravel/3.x/install.sh)
The script handles everything automatically:
composer require elitedevsquad/sidecar-laravel --dev- Publishes
config/devsquad-sidecar.php - Writes all
.envvariables (auto-detects APP_URL, mail server, git remote) - Mirrors keys into
.env.example - Injects the CSRF meta tag into any blade layout that has
<html>,<body>and<meta>
After running, complete the User Mapping step below.
Manual Setup
If you prefer not to use the install script:
composer require elitedevsquad/sidecar-laravel --dev
php artisan vendor:publish --tag="devsquad-sidecar"
Then add the env variables below, configure user mapping, and ensure the CSRF meta tag is in your main layout:
<meta name="csrf-token" content="{{ csrf_token() }}">
User Mapping
In AppServiceProvider.php, configure Sidecar inside a class_exists() guard so the app does not break when the package is absent (e.g. production with --no-dev):
public function boot(): void
{
if (class_exists(\EliteDevSquad\SidecarLaravel\Sidecar::class)) {
\EliteDevSquad\SidecarLaravel\Sidecar::$userMap = [
'id' => 'id',
'name' => 'first_name',
'role' => 'role.name',
'email' => 'email',
];
\EliteDevSquad\SidecarLaravel\Sidecar::$userBuilder = \App\Models\User::with('role');
}
}
Log in from Playwright or an AI agent
Print a signed link and open it in the browser. No CSRF token and no sidecar UI needed:
php artisan sidecar:login-url 1 --base=http://localhost:8082 --redirect=/dashboard
The signature does not include the host, so a link works on any host that serves the app (localhost, a worktree port, a tunnel). --redirect must be on the same host. Links expire after --minutes (default 60): ask for a new one instead of reusing an old one.
Environment Variables
The install script writes these automatically. Reference for manual setup or code review:
# DevSquad Sidecar
DS_SIDECAR_ENABLED=true
VITE_DS_SIDECAR_ENABLED="${DS_SIDECAR_ENABLED}"
DS_SIDECAR_TINKER_ENABLED=true
DS_SIDECAR_TINKER_USE_BATCH=true
DS_SIDECAR_TINKER_TIMEOUT=60
DS_SIDECAR_COMMANDS_ENABLED=true
DS_SIDECAR_FAKE_CLOCK_ENABLED=true
DS_SIDECAR_FAKE_CLOCK_DATABASE=false
DS_SIDECAR_PRESENCE_ENABLED=true
DS_SIDECAR_PRESENCE_REQUIRE_CONFIRM=true
DS_SIDECAR_ACTIVITY_RETENTION_DAYS=2
DS_SIDECAR_ACTIVITY_CLEANUP_SCHEDULE=true
DS_SIDECAR_ALLOWED_IPS="127.0.0.1"
DS_SIDECAR_BRANCH_URL=https://github.com/your-org/your-repo/tree/
DS_SIDECAR_LINK_MAIL=http://localhost:8025
DS_SIDECAR_LINK_ENVOYER=""
DS_SIDECAR_ALLOWED_IPS supports exact IPs, CIDR ranges, and prefix matching:
DS_SIDECAR_ALLOWED_IPS="127.0.0.1,192.168.1.0/24,10.0.0"
DS_SIDECAR_PRESENCE_* — who is testing a shared environment and the timeline of what they ran. Off on local, on everywhere else unless set to false. Stored in storage/app/sidecar/; php artisan sidecar:activity:clear removes old activity (--days=N, --all, --dry-run) and runs daily when the schedule switch is on.
HEADER_BRANCH_NAME — on servers without git (e.g. Envoyer), inject via release hook:
cd {{ release }}
sed -i '/HEADER_BRANCH_NAME/d' .env
echo HEADER_BRANCH_NAME="{{ branch }}" >> .env
Frontend
Laravel apps (auto-inject enabled): no action needed. The Sidecar JS is injected automatically before </body> on every non-production HTML response.
Laravel apps with Vite (auto-inject disabled): if you set DS_SIDECAR_AUTO_INJECT_ASSETS=false in your .env, load Sidecar manually in your JavaScript entry point:
touch resources/js/devsquad-sidecar.js
// resources/js/devsquad-sidecar.js
import { Sidecar } from "../../vendor/elitedevsquad/sidecar-laravel/resources/js/index.js";
if (import.meta.env.VITE_DS_SIDECAR_ENABLED === "true") {
document.addEventListener("DOMContentLoaded", () => new Sidecar());
}
// resources/js/app.js
import "./devsquad-sidecar";
Then build your assets:
npm run build
External apps (Next.js, Nuxt, etc.): the bundle is served by the Laravel route GET /__devsquad-sidecar/assets/js and reads window.__sidecarBaseUrl at runtime to prefix all API calls.
// e.g. pages/_app.js, app/layout.js, plugins/sidecar.js
if (process.env.NODE_ENV !== 'production') {
window.__sidecarBaseUrl = process.env.NEXT_PUBLIC_APP_URL ?? 'https://your-laravel-app.com';
const s = document.createElement('script');
s.src = window.__sidecarBaseUrl + '/__devsquad-sidecar/assets/js';
s.defer = true;
document.head.appendChild(s);
}
Fake Clock:
- Setting a clock anchors "now" at the chosen instant and keeps ticking in real time (it no longer freezes time).
- Web requests are scoped to your browser session, so a clock you set never leaks to other users or guests — normal app pages keep real time for everyone else.
- The clock is also mirrored to the shared cache, so CLI processes such as
php artisan schedule:runpick it up. Each scheduler tick is a fresh process that re-reads the clock, so changing or resetting it takes effect without restarting anything. - It is disabled in production and can be toggled with
DS_SIDECAR_FAKE_CLOCK_ENABLED. - A clock can be set for a while (
ttl, in seconds): it then returns to real time on its own, in the browser, the scheduler and the workers. Without attlit stays until it is reset. - Queue workers (
queue:work, Horizon) read the clock again before each job, so a change takes effect without restarting them. Octane still captures it at boot. - With
DS_SIDECAR_FAKE_CLOCK_DATABASE(on by default whenAPP_ENV=sandbox), the database'sNOW()andCURRENT_TIMESTAMPmove with the clock, on MySQL and MariaDB.SYSDATE()does not.
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v3.7.0 | ^8.2 | ^11.0 || | MIT | |
| v3.6.1 | ^8.2 | ^11.0 || | MIT | |
| v3.6.0 | ^8.2 | ^11.0 || | MIT | |
| v3.5.0 | ^8.2 | ^11.0 || | MIT | |
| v3.4.0 | ^8.2 | ^11.0 || | MIT | |
| v3.3.1 | ^8.2 | ^11.0 || | MIT | |
| v3.3.0 | ^8.2 | ^11.0 || | MIT | |
| v3.2.2 | ^8.2 | ^11.0 || | MIT | |
| v3.2.1 | ^8.2 | ^11.0 || | MIT | |
| v3.2.0 | ^8.2 | ^11.0 || | MIT | |
| v3.1.0 | ^8.2 | ^11.0 || | MIT | |
| v3.0.3 | ^8.2 | ^11.0 || | MIT | |
| v3.0.2 | ^8.2 | ^11.0 || | MIT | |
| v3.0.1 | ^8.2 | ^11.0 || | MIT | |
| v3.0.0 | ^8.2 | ^11.0 || | MIT | |
| v2.1.0 | ^8.2 | ^11.0 || | MIT | |
| v2.0.4 | ^8.2 | ^12.0| | MIT | |
| v2.0.3 | ^8.2 | ^12.0| | MIT | |
| v2.0.2 | ^8.2 | ^12.0| | MIT | |
| v2.0.1 | ^8.2 | ^12.0| | MIT | |
| v2.0.0 | ^8.2 | ^12.0| | MIT | |
| v1.3.0 | ^8.2 | ^12.0| | MIT | |
| v1.2.3 | ^8.2 | ^12.0| | MIT | |
| v1.2.2 | ^8.2 | ^12.0| | MIT | |
| v1.2.1 | ^8.2 | ^12.0| | MIT | |
| v1.2.0 | ^8.2 | ^12.0| | MIT | |
| v1.1.0 | ^8.2 | ^12.0| | MIT | |
| v1.0.7 | ^8.2 | ^12.0| | MIT | |
| v1.0.6 | ^8.2 | ^12.0| | MIT | |
| v1.0.5 | ^8.2 | ^12.0| | MIT |
Showing the latest 30 of 35. See every release on Packagist