使用php artisan make:auth
、その後:
あなたがに移動する必要が Userモデルを使用して、ユーザーからの既定のテーブルを変更するには:config/auth.php
そして、これらの変更
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\UsersTable::class, //put the right model name here or you can use database driver
],
],
を作ります雄弁なモデルの表を変更するには、これを行うことができます。
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class UsersTable extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'UsersTable';
}
はちょうどlaravelによって生成Authcontrollerに
class AuthController extends Controller
{
use AuthenticatesAndRegistersUsers, ThrottlesLogins;
protected $redirectTo = '/home';
protected $username = 'username'; // you can put whatever column you want here from your table
今 編集laravelはビューを生成し、これを追加し、ユーザー名に電子メールからデフォルトのログイン資格情報を変更してname="username"
に電子メールの入力名を変更するにはmain.blade.php
を拡張し、いくつかのスタイリングを行うと、あなたは私が
EDIT推測行ってもいいです:いけない検証のものを変更することを忘れを
ありがとうございました!パスワードフィールドはどうですか? $ password = 'PassWordField'はできますか? – srakrn
hmm私は本当にそれについて知っていませんが、これはあなたのために働いた場合は、ショットとbtwを与えてください、投票のセクションの下に緑色のマーク –