Hornbill LitePress
Alice Nguyen · Laravel ·

Getting Started with Laravel 12

A practical guide to getting Started with Laravel 12 — tips, best practices, and real-world examples.

# Getting Started with Laravel 12

Laravel 12 brings significant improvements to the framework, making it easier than ever to build modern web applications.

## What's New in Laravel 12

The latest release includes:

- **Improved routing** with better performance and new middleware patterns
- **Enhanced Eloquent** with new relationship types and query optimizations
- **Better Docker support** out of the box

## Installation

```bash
composer create-project laravel/laravel my-app
cd my-app
php artisan serve
```

## Key Features

### New Service Container Features

The service container now supports auto-wiring with better type detection:

```php
// Automatically resolved
public function __construct(
private UserService $users,
private CacheService $cache,
) {}
```

### Blade Improvements

New blade components make it easier to build reusable UI:

```blade
<x-card title="Welcome">
<x-slot:actions>
<x-button>Learn More</x-button>
</x-slot>
</x-card>
```

## Conclusion

Laravel 12 is a significant step forward for the framework. Whether you're building a simple blog or a complex enterprise application, the new features will help you ship faster.
Laravel PHP Tutorial

Written by

A
Alice Nguyen

Full-stack developer writing about web architecture, Laravel, and open-source tooling.

← Back to Alice Nguyen's posts