I have a question about Laravel 5. After using Form::open
, some error occurs:
error : Call to a member function domain() on a non-object
FatalErrorException in UrlGenerator.php line 440:
Call to a member function domain() on a non-object
in UrlGenerator.php line 440
at HandleExceptions->fatalExceptionFromError(array('type' => '1', 'message' => 'Call to a member function domain() on a non-object', 'file' => '/home/nl/Laravel/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php', 'line' => '440')) in HandleExceptions.php line 116
at HandleExceptions->handleShutdown()
This is my LoginCheckController.php:
<?php namespace App\Http\Controllers;
class LoginCheckController extends BaseController {
public function index()
This is my route:
Route::post('/LoginCheck', 'LoginCheckController@index');
In view I have this:
{!! Form::open(array('action' => 'LoginCheckController@index')) !!}
I also ran composer dump-autoload
and php artisan clear-compiled
, but I still get the error. Is there something I forgot?
I solved it by:
- Re-installing composer with clear version
- php artisan make:controller with manual