- How do I install Laravel Totem in my Laravel 12 project?
- Run `composer require studio/laravel-totem`, then execute `php artisan migrate` and `php artisan totem:assets` to set up the database and frontend assets. Ensure your cron job runs `artisan schedule:run` as Totem relies on Laravel’s native scheduler.
- Can I use Laravel Totem with Laravel 11 or 12?
- Yes, Totem supports both Laravel 11.x and 12.x. Check the [compatibility matrix](https://github.com/always-open/laravel-totem) for version-specific details. PHP 8.2+ is required for all versions.
- What happens if I don’t have `artisan schedule:run` set up in my cron?
- Totem **requires** `artisan schedule:run` to be executed via cron (e.g., `* * * * * cd /path && php artisan schedule:run`). Without it, the dashboard will show no scheduled jobs. Verify your cron syntax and permissions before installing Totem.
- How do I restrict access to the Totem dashboard?
- Use the `Totem::auth()` method in your `AppServiceProvider` to customize access. For example, `Totem::auth(fn() => Auth::check());` restricts access to authenticated users. By default, the dashboard is local-environment-only.
- Will Totem work with custom Artisan commands that have complex parameters?
- Totem handles standard Artisan commands well, but complex signatures (e.g., nested options or custom flags) may not parse correctly in the UI. Test edge cases early or extend the package’s parameter parsing logic via service providers.
- Can I change the database table names to avoid conflicts?
- Yes, set the `TOTEM_TABLE_PREFIX` environment variable (e.g., `TOTEM_TABLE_PREFIX=my_`) to prefix Totem’s tables. This prevents conflicts with existing tables like `tasks` or `jobs` in your project.
- Does Laravel Totem support Redis for caching?
- Totem supports shared cache stores like Redis via the `TOTEM_CACHE_STORE` config. If your UI and worker servers use separate caches, set this to `redis` or another supported driver to avoid stale data.
- How do I handle failed jobs or notifications in Totem?
- Totem integrates with Laravel’s notification system (e.g., email, Slack) for failed jobs. Configure notifications in your `AppServiceProvider` or extend the package’s event listeners for custom alerts.
- Is there a way to whitelist/blacklist Artisan commands in the dashboard?
- Yes, Totem allows filtering commands via config. Use the `totem.commands` array in `config/totem.php` to whitelist or blacklist specific Artisan commands, reducing UI clutter for large projects.
- What are the alternatives to Laravel Totem for managing cron jobs?
- Alternatives include **Laravel Horizon** (for queues/jobs), **Laravel Forge** (server-level cron management), or **custom solutions** like direct crontab edits. Totem stands out by offering a **dashboard-driven UI** for Laravel’s scheduler without requiring queues.