Laravel Idea 5.0
Laravel 9 support, convenient Laravel files creation, spatie packages support, and much more
The new major Laravel Idea update was released a bit before Laravel 9 release. We prepared everything to support it and added some significant features.
A new Laravel item in the New menu will help to quickly create Laravel classes in a case when usual Code generations aren't available:
This list is configurable in the Laravel Idea settings: Code generations section.
A new Route::controller() method was introduced in the Laravel 8.80 and now has full support in the Laravel Idea:
We added support for popular spatie/laravel-query-builder package. Relation and field completions for all "allowed*" method calls:
As well as completions for some rules from spatie/laravel-validation-rules package.
Convenient completions for Blade pair directives like @if/@endif, @foreach/@endforeach, and others:
We removed the @class directive in one of the previous updates, but the PhpStorm team fixed the bug (it was hiding the "class" HTML attribute completion), so we returned it!
An updated ide.json files support will help package developers set up some completion specific to their packages. For example, a small ide.json file with this content placed somewhere in the package source:
{
"$schema": "https://laravel-ide.com/schema/laravel-ide-v2.json",
"completions": \[
{
"complete": "routeName",
"condition": \[
{
"classNames": \["PackageFacade"\],
"methods": \["routeForTenant"\],
"parameters": \[1\]
}
\]
}
\],
"blade": {
"directives": \[
{
"name": "routeForTenant",
"prefix": "<?php echo PackageFacade::routeForTenant(",
"suffix": "); ?>"
}
\]
}
}
Will allow package users to have completion not only for routeForTenant method:
But for @routeForTenant Blade directive and its parameter:
We are preparing complete documentation for ide.json files right now.
Small features:
- Support for a new Eloquent attributes style (Laravel 8.77).
- Support for Livewire ".index" components
- Laravel Idea's helper code moved out from Project files, so it won't pollute the Class search.
- Improved package fetching for projects with the removed composer.lock file - composer lock option
- Completions for Eloquent methods: whereFullText, orWhereFullText, getOriginalWithoutRewindingModel, originalIsEquivalent, getRawOriginal, syncOriginalAttribute, syncOriginalAttributes
- Other completions and a lot of fixes.
Laravel Idea team.