Hello i am new laravel and mongoDB, in my project i am trying to use laravel and mongoDB. I am successful to installed mongoDB as well as bootstrap thems AdminLTE2 this is link of AdminLTE2 http://ift.tt/20Oa3Kw. But now i am facing problem when user login. Following my code
Route.php
<?php
Route::get('/', function () { return view('welcome'); });
Route::post('/auth/login', 'Auth\AuthController@postLogin');
login.blade.php
<form action="" method="post">
<input type="hidden" name="_token" value="">
<div class="form-group has-feedback">
<input type="email" class="form-control" placeholder="Email" name="email"/>
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="Password" name="password"/>
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
<div class="checkbox icheck">
<label>
<input type="checkbox" name="remember"> Remember Me
</label>
</div>
</div><!-- /.col -->
<div class="col-xs-4">
<button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>
</div><!-- /.col -->
</div>
</form>
This is my AuthController.php
<?php
namespace App\Http\Controllers\Auth;
use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
class AuthController extends Controller
{
use AuthenticatesAndRegistersUsers, ThrottlesLogins;
protected $redirectTo = '/home';
/**
* Create a new authentication controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware($this->guestMiddleware(), ['except' => 'logout']);
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|confirmed|min:6',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
}
after login form submit i getting this error
FatalErrorException in Builder.php line 1493: Call to a member function compileSelect() on a non-object
Please help me.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1sxNF93
via IFTTT
Aucun commentaire:
Enregistrer un commentaire