Support the ongoing development of Laravel.io →
Installation Configuration Forms
Last updated 2 years ago.
0

Same problem

{{ Form::open(['action' => 'user.login', 'method' => 'post', 'class' => 'navbar-form']) }}
    {{ Form::token() }}
    {{ Form::text('username', '', array('class' => 'input-small', 'placeholder' => trans('user.username'))) }}
    {{ Form::password('password', array('class' => 'input-small', 'placeholder' => trans('user.password'))) }}
    {{ Form::submit(trans('user.login')) }}
{{Form::close()}}
Last updated 2 years ago.
0

Maybe if we are not requiring in composer bad version?

Last updated 2 years ago.
0

I have to do this now, since my last update of the dev version.

{!! Form::open(array('action' => 'HomeController@index')) !!}

I get the "Call to a member function domain() on a non-object" if the controller function requested does not have a route defined.

$router->get('/',  'HomeController@index');

If you name your routes you could use this instead,

$router->get('/', ['as' => 'home', 'uses' => 'HomeController@index']);

{!! Form::open(array('route' => 'home')) !!}
Last updated 2 years ago.
0

Maybe need to use the namespace for your route action since controllers are now that way in L5.

Last updated 2 years ago.
0
{!! Form::open(array('action' => '\App\Http\Controllers\HomeController@index')) !!}
  vs
{!! Form::open(array('action' => 'HomeController@index')) !!}

That does work, but only if there is a route that uses the HomeController@index. If I direct to another function in HomeController,

{!! Form::open(array('action' => '\App\Http\Controllers\HomeController@test')) !!}

I get the "Call to a member function domain() on a non-object" error as i have no route assigned in my routes file using the HomeController@test

I'd say the "Call to a member function domain() on a non-object" is directly related to if there is a route or not using the controller referenced.

Last updated 2 years ago.
0

ok, in my case it is fixed after I changed my form open method like that: old one:

{{ Form::open(['action' => 'user.login', 'method' => 'post', 'class' => 'navbar-form']) }}

new one:

{{ Form::open(['route' => 'user.login', 'method' => 'post', 'class' => 'navbar-form']) }}

but now I have a new problem: Form-Code isn't printed as HTML-Code, like it would go through html_entities bevor showed

<form method="POST" action="http://localhost/login" accept-charset="UTF-8" class="navbar-form"><input name="_token" type="hidden" value="Z0toZCVVad5jRzWAss3L1HlYMSABiNutyOvABWJq">

this is what I see in the browser now... so in source code it's this:

&lt;form method=&quot;POST&quot; action=&quot;http://localhost/register&quot; accept-charset=&quot;UTF-8&quot; class=&quot;navbar-form&quot;&gt;&lt;input name=&quot;_token&quot; type=&quot;hidden&quot; value=&quot;Z0toZCVVad5jRzWAss3L1HlYMSABiNutyOvABWJq&quot;&gt;
Last updated 2 years ago.
0

Blade in Laravel 5 has a new security feature. It will autoescape everything you put between {{ and }}. You need to use

{!! Form::open(['route' => 'user.login', 'method' => 'post', 'class' => 'navbar-form']) !!}

There is some more info on this over at Laracasts.

Last updated 2 years ago.
0

Although I didn't find it on my own: This is one of the awesome cool things why I love laravel.... Thanks guys - now's everything fine...

Last updated 2 years ago.
0

dakira said:

Blade in Laravel 5 has a new security feature. It will autoescape everything you put between {{ and }}. You need to use

{!! Form::open(['route' => 'user.login', 'method' => 'post', 'class' => 'navbar-form']) !!}

There is some more info on this over at Laracasts.

I'm always having thesre error with 'route' : ErrorException in UrlGenerator.php line 237: Route [contact.store] not defined. (View: D:\www\mycontact\resources\views\pages\contact.blade.php)

But when i use 'url' , there is no error message...

How to fix that ?

Last updated 2 years ago.
0

Two problems with your implementation:

  • You should bootstrap illuminate/html like all exrernal packages in app.php:

add in Providers[] :

'Illuminate\Html\HtmlServiceProvider',

add in Facades[]:

'HTML'      => 'Illuminate\Html\HtmlFacade',
'Form'      => 'Illuminate\Html\FormFacade',
  • Don't forget that {{...}} auto-escapes html as for L5. Use {!! ... !!}} for html output.
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

homoky homoky Joined 23 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.