Вопрос

How can I print post back data on any view page in Laravel framework which uses blade template system.

$_POST['state'] is not giving any results.

Это было полезно?

Решение

Laravel encapsulates the whole request data in the Input Facade, so you just have to:

State: {{ Input::get('state') }}

or, if you're trying to read data from a redirected request:

State: {{ Input::old('state') }}

You can use conditionals this way in Blade:

@if(Input::get('state'))
   <button ...>
@endif
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top