I have been trying to figure out why is this happening ! I have used the laravel's built in authentication method ,my laravel version is 5.7 and DB is Mysql.The problem is that when I try to login , there is no reaction performed by the server , otherwise , the signup procedure works correctly .I have to mention that when I use these codes with another database built with migrations, everything goes well . Here is my model :
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
protected $table = 'person';
use Notifiable;
protected $guarded= [];
}
Here is my login controller :
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
use AuthenticatesUsers;
/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest')->except('logout');
}
public function username()
{
return 'username';
}
}
routers
<?php
Auth::routes();
Route::get('/', 'HomeController@index')->name('indexPage');
Route::get('/contact-us', 'ContactUsController@index')->name('contactPage');
Route::get('/about-us', function(){return view('pages.AboutUs');})->name('aboutPage');
Route::resource('/brands' , 'brandController');