laravel-idea / plugin

Laravel Idea plugin for PhpStorm
https://laravel-idea.com/
177 stars 7 forks source link

[Feature Request]: Spatie: Laravel-data #936

Open BoyeMagnus opened 9 months ago

BoyeMagnus commented 9 months ago

Feature Description

It would be great to have support for Spatie's Laravel-data package with auto-completion of:

Keys in initializer, and type of data: https://spatie.be/docs/laravel-data/v4/as-a-resource/from-data-to-array

SongData::validateOrCreate([ // ::from / other init methods
    'name' => 'Never gonna give you up',
    'artist' => 'Rick Astley'
]);

In a V2 maybe also typehinting on:

$request->validated('KEYHERE'),

when a DTO is rules in request rules:

public function rules(): array {
    return SongData::getValidationRules($this->all());
}
anburocky3 commented 6 months ago

Yea it would be super helpful. @adelf