モデルでアクセサの定義
Hoge.php
public function getTotalCostAttribute() { ・・・ }
アクセサはこうだとする
アクセサでのソート
$margins = Hoge::all() ->sortByDesc('totalCost')
var 優技録 = []string{ "Golang", "Vue.js", "AWS", "PHP", "DB", "IaC", "SRE"}
モデルでアクセサの定義
Hoge.php
public function getTotalCostAttribute() { ・・・ }
アクセサはこうだとする
アクセサでのソート
$margins = Hoge::all() ->sortByDesc('totalCost')