Search code examples
laravellumen

Call to undefined function method_field()


I have created a view for lumen with this code:

<form action="{{ route('extentions.update', ['id'=>$extention->id]) }}" class="form" method="POST">
        @method('PUT')
        @include('extentions._partials.form')
        <button type="submit">Enviar</button>
    </form>

However i am getting the error Call to undefined function method_field() when opening this view, does Lumen not have the @method function? If so, what should I do?


Solution

  • Using <input type="hidden" name="_method" value="PUT"> instead of @method('PUT') worked.