Laravel
Resources
Section titled “Resources”Articles
Section titled “Articles”- Laravel News
- Set up a Laravel environment in VS Code with Dev Containers
- Using Laravel in VS Code (Start Quickly with a Dev Container! 📦)
- Debug your Laravel Sail Applications with xDebug
- How To Install and Configure Laravel with Nginx on Ubuntu 22.04 (LEMP)
- You don’t need Laravel Sail (opinion piece)
- How to Log All SQL Queries in Laravel
Components
Section titled “Components”- Blade
- Templating engine that allows using full PHP
- Cashier
- Subscription billing using Stripe or Paddle
- Dusk
- Selenium-based browser automation (testing)
- Echo
- Event broadcasting using WebSockets (for JavaScript clients)
- Eloquent
- Homestead
- Pre-packaged Vagrant VM for development
- Horizon
-
Dashboard and code-driven configuration for your Laravel powered Redis queues
-
- Octane
- Increase performance and concurrency with application servers
- Pint
-
Opinionated PHP code style fixer
-
- Queues
-
Process jobs using Redis, Amazon SQS, or even MySQL and Postgres.
-
- Sanctum
- Manage simple API keys/tokens
- Sail
-
A light-weight command-line interface for interacting with Laravel’s default Docker development environment
-
- Scout
- Syncs ORM models/records with full-text search indexes in Algolia, Meilisearch, or MySQL/PostgreSQL
- Socialite
- OAuth authentication via Facebook, Twitter, LinkedIn, Google, GitHub, GitLab, and Bitbucket
- Telescope
- Debugging UI
- Valet
- nginx-based development environment for macOS
Add-ons
Section titled “Add-ons”- Nova
-
Administration panel for Laravel
-
- Spark
- Recurring billing using Stripe, Paddle, PayPal (via Paddle)
Services
Section titled “Services”- Envoyer
- Zero-downtime deployment for all PHP applications
- Forge
-
Provision and deploy unlimited PHP applications on DigitalOcean, Akamai, Linode, Vultr, Amazon, Hetzner and more.
-
- Vapor
-
A serverless deployment platform for Laravel, powered by AWS
- Learn Laravel Vapor YouTube playlist
-
Starter kits
Section titled “Starter kits”- Breeze
-
Lightweight starter kit scaffolding for new applications with Blade or Inertia.
-
- Jetstream
- Starter kit using Tailwind and either Livewire or Inertia scaffolding
Third-party
Section titled “Third-party”Packages
Section titled “Packages”JavaScript
Section titled “JavaScript”- Inertia
-
Create modern single-page React, Vue, and Svelte apps using classic server-side routing. Works with any backend — tuned for Laravel.
-
- Livewire
-
Livewire is a full-stack framework for Laravel that makes building dynamic interfaces simple, without leaving the comfort of Laravel.
-
Software based on Laravel
Section titled “Software based on Laravel”- Statamic CMS
- Laravel Zero
-
Micro-framework for console applications
-
Cloud-config example for remote development using VS Code
Section titled “Cloud-config example for remote development using VS Code”- This example assumes Ubuntu 22.04.
- Adjust the usernames everywhere (search for “claus” and “cconrad”).
#cloud-configpackage_update: truepackage_upgrade: truepackages:- ssh-import-id- nginx- php8.1-fpm- php-mysql- php-cli- unzip- telnet- php-mbstring- php-xml- php-bcmath- php-curl- mysql-serverpower_state: mode: rebootruncmd:- sed -i -e '/^\(#\|\)PasswordAuthentication/s/^.*$/PasswordAuthentication no/' /etc/ssh/sshd_config- sed -i -e '/^\(#\|\)X11Forwarding/s/^.*$/X11Forwarding no/' /etc/ssh/sshd_config- sed -i -e '/^\(#\|\)MaxAuthTries/s/^.*$/MaxAuthTries 2/' /etc/ssh/sshd_config- sed -i -e '/^\(#\|\)AuthorizedKeysFile/s/^.*$/AuthorizedKeysFile .ssh\/authorized_keys/' /etc/ssh/sshd_config- rm /var/www/html/*- chown -R claus:claus /var/www/html- curl -sS https://getcomposer.org/installer -o /root/composer-setup.php- php /root/composer-setup.php --install-dir=/usr/local/bin --filename=composersystem_info: apt_get_wrapper: enabled: Falseusers:- name: claus groups: users, admin sudo: ALL=(ALL) NOPASSWD:ALL shell: /bin/bash ssh_import_id: - gh:cconradwrite_files:- path: /etc/nginx/sites-enabled/default content: | server { listen 80 default_server; root /var/www/html; index index.html index.htm index.php; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; } }Language files not loaded
Section titled “Language files not loaded”- If Laravel does not seem to use translation files from the
./langdirectory, check if you have a./resources/langdirectory, and delete it.
Eloquent query logging
Section titled “Eloquent query logging”\Illuminate\Support\Facades\DB::connection()->enableQueryLog();// Run some queries...$queries = \Illuminate\Support\Facades\DB::getQueryLog();Changes to “Job” classes do not take effect
Section titled “Changes to “Job” classes do not take effect”- Make sure to restart the queue worker (e.g. Horizon) after each code change.
Laravel Tinker does not alias model automatically
Section titled “Laravel Tinker does not alias model automatically”- Run
composer dump-autoloadto regenerate the list of all known classes
Updating created_at manually
Section titled “Updating created_at manually”- The
$model->unguard()method allows to temporarily remove protection from mass assignment on a model instance. Apparently this also allows updating thecreated_atproperty.
“A facade root has not been set.” in beforeAll of Pest test
Section titled ““A facade root has not been set.” in beforeAll of Pest test”- Laravel methods only work in
beforeEach, not inbeforeAll.