'Cutted string when get value of field
Solution 1:[1]
Can you check your CursSM model file, there may be a attribute casting, which override the result. Check the additional information in laravel documentation - https://laravel.com/docs/9.x/eloquent-mutators
Solution 2:[2]
I can't understand!
Model was:
class cursSM extends Model
{
use HasFactory;
protected $table = 'curs_sm';
protected $primaryKey = 'curs';
public $timestamps = false;
}
changed to
class cursSM extends Model
{
use HasFactory;
protected $table = 'curs_sm';
}
now works fine!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | David Barrabes Vera |