2
0

More than 1 year has passed since last update.

LaravelのModelでコンストラクタを使う

Last updated at Posted at 2021-12-09

結論

App/Models/User.php
/**
 * Create a new Eloquent model instance.
 *
 * @param  array  $attributes
 * @return void
 */
public function __construct($attributes = [])
{
    parent::__construct($attributes);
    # 他の処理
}

参考

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0