Mutators only work with eloquent model,when you work with DB::table,You are not using model layer to communicate with database,you are connecting to database directly,so all mutators,accessors,cast properties and ... you have defined in model layer doesnt participate in your request lifecycle.