---
title: Laravel
kind: note
description: The PHP Framework for Web Artisans Resources Laracasts YouTube Blog Articles Laravel News Set up a Laravel environment in VS Code with Dev Containers Using Laravel in VS Code (Start Quickly with a Dev…
words: 472
readingMinutes: 2
created: '2024-06-12T18:20:49+02:00'
updated: '2026-06-29T11:51:25+02:00'
---
> The [PHP](/notes/php) Framework for [Web](/notes/web-development) Artisans
## Resources
- [Laracasts](https://laracasts.com/)
- [YouTube](https://www.youtube.com/@LaravelPHP)
- [Blog](https://blog.laravel.com/)
### Articles
- [Laravel News](https://laravel-news.com/)
- [Set up a Laravel environment in VS Code with Dev Containers](https://www.youtube.com/watch?v=0s5ukLSpSZM)
- [Using Laravel in VS Code (Start Quickly with a Dev Container! 📦)](https://www.youtube.com/watch?v=ojWxCP1lT-Y)
- [Debug your Laravel Sail Applications with xDebug](https://medium.com/geekculture/debug-your-laravel-sail-applications-with-xdebug-160ad70fcd41)
- [How To Install and Configure Laravel with Nginx on Ubuntu 22.04 (LEMP)](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-laravel-with-nginx-on-ubuntu-22-04#step-3-creating-a-new-laravel-application)
- [You don't need Laravel Sail](https://tech.osteel.me/posts/you-dont-need-laravel-sail) (opinion piece)
- [How to Log All SQL Queries in Laravel](https://codebriefly.com/how-to-log-all-sql-queries-in-laravel/)
## Components
- Blade
	- Templating engine that allows using full PHP
- [Cashier](https://laravel.com/docs/10.x/billing)
	- Subscription billing using Stripe or Paddle
- [Dusk](https://laravel.com/docs/10.x/dusk)
	- Selenium-based browser automation (testing)
- [Echo](https://laravel.com/docs/broadcasting)
	- Event broadcasting using WebSockets (for [JavaScript](/notes/javascript) clients)
- [Eloquent](https://laravel.com/docs/eloquent)
	- > ORM for [MySQL](/notes/mysql), [Postgres](/notes/postgresql), SQLite and <span class="dead-link">SQL Server</span>
- [Homestead](https://laravel.com/docs/10.x/homestead)
	- Pre-packaged Vagrant VM for development
- [Horizon](https://laravel.com/docs/10.x/horizon)
	- > Dashboard and code-driven configuration for your Laravel powered Redis queues
- [Octane](https://laravel.com/docs/10.x/octane)
	- Increase performance and concurrency with application servers
- [Pint](https://laravel.com/docs/10.x/pint)
	- > Opinionated PHP code style fixer
- [Queues](https://laravel.com/docs/queues)
	- > Process jobs using Redis, Amazon SQS, or even MySQL and Postgres.
- [Sanctum](https://laravel.com/docs/sanctum)
	- Manage simple API keys/tokens
- [Sail](https://laravel.com/docs/10.x/sail)
	- > A light-weight command-line interface for interacting with Laravel's default Docker development environment
- [Scout](https://laravel.com/docs/10.x/scout)
	- Syncs ORM models/records with full-text search indexes in Algolia, Meilisearch, or MySQL/PostgreSQL
- [Socialite](https://laravel.com/docs/10.x/socialite)
	- OAuth authentication via Facebook, Twitter, LinkedIn, Google, [GitHub](/notes/github), GitLab, and Bitbucket
- [Telescope](https://laravel.com/docs/10.x/telescope)
	- Debugging UI
- [Valet](https://laravel.com/docs/10.x/valet)
	- <span class="dead-link">nginx</span>-based development environment for [macOS](/notes/macos)
## Add-ons
- [Nova](https://nova.laravel.com/)
	- > Administration panel for Laravel
- [Spark](https://spark.laravel.com/)
	- Recurring billing using Stripe, Paddle, PayPal (via Paddle)
## Services
- [Envoyer](https://envoyer.io/)
	- Zero-downtime deployment for all PHP applications
- [Forge](https://forge.laravel.com/)
	- > Provision and deploy unlimited PHP applications on DigitalOcean, Akamai, Linode, Vultr, [Amazon](/notes/aws), Hetzner and more.
- [Vapor](https://vapor.laravel.com/)
	- > A serverless deployment platform for Laravel, powered by AWS
	- [Learn Laravel Vapor](https://www.youtube.com/playlist?list=PLcjapmjyX17gqhjUz8mgTaWzSv1FPgePD) YouTube playlist
## Starter kits
- [Breeze](https://laravel.com/docs/10.x/starter-kits#laravel-breeze)
	- > Lightweight starter kit scaffolding for new applications with Blade or Inertia.
- [Jetstream](https://jetstream.laravel.com/)
	- Starter kit using Tailwind and either Livewire or Inertia scaffolding
## Third-party
### Packages
- [Packalyst](https://packalyst.com/)
### JavaScript
- [Inertia](https://inertiajs.com/)
	- > Create **modern single-page React, Vue, and Svelte apps** using classic server-side routing. Works with any backend — tuned for Laravel.
- [Livewire](https://laravel-livewire.com/)
	- > Livewire is a full-stack framework for Laravel that makes building dynamic interfaces simple, without leaving the comfort of Laravel.
### Software based on Laravel
- [Statamic CMS](https://statamic.com/)
- [Laravel Zero](https://laravel-zero.com/)
	- > Micro-framework for console applications
## FAQ
### <span class="dead-link">Cloud-config</span> example for remote development using [VS Code](/notes/vscode)
- This example assumes [Ubuntu](/notes/ubuntu) 22.04.
- Adjust the usernames everywhere (search for "claus" and "cconrad").
```yaml
#cloud-config
package_update: true
package_upgrade: true
packages:
- ssh-import-id
- nginx
- php8.1-fpm
- php-mysql
- php-cli
- unzip
- telnet
- php-mbstring
- php-xml
- php-bcmath
- php-curl
- mysql-server
power_state:
  mode: reboot
runcmd:
- 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=composer
system_info:
  apt_get_wrapper:
    enabled: False
users:
- name: claus
  groups: users, admin
  sudo: ALL=(ALL) NOPASSWD:ALL
  shell: /bin/bash
  ssh_import_id:
  - gh:cconrad
write_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
- If Laravel does not seem to use translation files from the `./lang` directory, check if you have a `./resources/lang` directory, and delete it.
	- [Source](https://stackoverflow.com/questions/40153529/laravel-translation-not-working#comment127261859_40153600)
### Eloquent query logging
```php
\Illuminate\Support\Facades\DB::connection()->enableQueryLog();
// Run some queries...
$queries = \Illuminate\Support\Facades\DB::getQueryLog();
```
### 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
- Run `composer dump-autoload` to regenerate the list of all known classes
### 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 the `created_at` property.
### "A facade root has not been set." in `beforeAll` of Pest test
- Laravel methods only work in `beforeEach`, not in `beforeAll`.
