Shift with red gradient lettering
Loading navigation...

Adopt property attributes

Premium
Laravel

Convert common Laravel class properties to their PHP attributes added in Laravel 13.

Before

class User extends Model
{
public $timestamps = false;
 
protected $fillable = ['name', 'email'];
 
protected $hidden = ['password', 'remember_token'];
 
protected $appends = ['full_name'];

After

#[Fillable('name', 'email')]
#[Hidden('password', 'remember_token')]
#[Appends('full_name')]
#[WithoutTimestamps]
class User extends Model {}

← Back to the Workbench Tasks