Код: Выделить всё
protected function fee(): Attribute{
return Attribute::make(
get: fn (?string $value) => str_replace('.', ',', $value) ?: 0,
set: fn (?string $value) => str_replace(',', '.', $value) ?: 0,
);
}
Код: Выделить всё
Model1::all()
Код: Выделить всё
1,50
Код: Выделить всё
$model1 = DB::table('model1');
$model1->where(....);
$model1->get();
Код: Выделить всё
1.50
Подробнее здесь: https://stackoverflow.com/questions/791 ... le-get-not