Support the ongoing development of Laravel.io →
posted 9 years ago
Authentication
Last updated 2 years ago.
0

Update your users migration file to include

$table->rememberToken();

Laravel requires remember_token column

Last updated 2 years ago.
0

thanks for your answer, but this error come : Call to undefined method User::newQuery()

Last updated 2 years ago.
0

You have a csrf token in your input. Remove it from the input you are passing to attempt.

Input::except('_token');

Input::only('username', 'password');

When you are adding extra fields to that attempt it will use them as conditions.

Last updated 2 years ago.
0

this is my code .. but ,it not word :(

public function Home()
	{
        
		 if(Auth::attempt(Input::only('username', 'password')))
		 {
		 	return Input::get('username');
		 }
		 else {
			 return 'You are Guest';
		 }
	}

please help me

my username and password in users db is : mahshid , 1234(hashed)

Last updated 2 years ago.
0

Can someone explain to me about login page?

Last updated 2 years ago.
0

app/models/User.php

class User .... {

	protected $fillable = ['username', 'password', etc...];
}
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

itjoo itjoo Joined 13 Sep 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.