IntegralW.php 450 B

123456789101112131415161718192021
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. class IntegralW extends Model{
  6. use SoftDeletes;
  7. protected $connection = 'mysql_w';
  8. protected $table='integral';
  9. protected $guarded=[];
  10. public function getIntegralAttribute($value){
  11. return round($value);
  12. }
  13. public function getIntegralDoubleAttribute($value){
  14. return round($value);
  15. }
  16. }