ユーザ用ツール

サイト用ツール


11_php:02_framework:01_laravel:42_auth

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

11_php:02_framework:01_laravel:42_auth [2020/01/17 13:12] – 作成 matsui11_php:02_framework:01_laravel:42_auth [2020/01/17 13:13] (現在) matsui
行 10: 行 10:
 app/User.phpが作成される。 app/User.phpが作成される。
 <code> <code>
 +<?php
 +
 +namespace App;
 +
 +use Illuminate\Notifications\Notifiable;
 +use Illuminate\Contracts\Auth\MustVerifyEmail;
 +use Illuminate\Foundation\Auth\User as Authenticatable;
 +
 +class User extends \TCG\Voyager\Models\User
 +{
 +    use Notifiable;
 +
 +    /**
 +     * The attributes that are mass assignable.
 +     *
 +     * @var array
 +     */
 +    protected $fillable = [
 +        'name', 'email', 'password',
 +    ];
 +
 +    /**
 +     * The attributes that should be hidden for arrays.
 +     *
 +     * @var array
 +     */
 +    protected $hidden = [
 +        'password', 'remember_token',
 +    ];
 +
 +    /**
 +     * The attributes that should be cast to native types.
 +     *
 +     * @var array
 +     */
 +    protected $casts = [
 +        'email_verified_at' => 'datetime',
 +    ];
 +}
 </code> </code>
  
11_php/02_framework/01_laravel/42_auth.txt · 最終更新: 2020/01/17 13:13 by matsui