I have just installed LaravelCollective v6.2 running $ composer require laravelcollective/html
command.
I made a form:
{!! Form::open(['url' => '/posts']) !!}
<div class="form-group">
<label for="inputTitle"></label>
<input type="text" class="form-control" id="inputTitle" placeholder="Enter title"
name="title">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
{!! Form::close() !!}
PhpStorm says Undefined class 'Form'. How can I fix this?
My composer.json:
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.40",
"laravel/tinker": "^2.5",
"laravelcollective/html": "^6.2"
},
Form
is a Laravel facade. Quite a bit of magic is involved here.
Do you use Laravel IDE Helper by Barry vd. Heuvel?
.php
file(s) that are used by the IDE to better understand the Laravel related code (facades and other Laravel stuff).Form
facade.