Infos.php 468 B

123456789101112131415161718192021
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Infos extends Model{
  5. protected $table='infos';
  6. // public function getContentsAttribute($value){
  7. // if(in_array($this->attributes['type'],[2,3,4,5,6])){
  8. // $value=json_decode($value);
  9. // if(in_array($this->attributes['type'],[4])){
  10. // $value->img = json_decode($value->img);
  11. // }
  12. // }
  13. // return $value;
  14. // }
  15. }