I am using laravel excel to export data from 'User' table. A query needs to be run and all the records that match the query will return.
My code is like
class UsersExport implements FromQuery
{
use Exportable;
public function __construct(string $code)
{
$this->code = $code;
}
public function query()
{
return Tantousya::query()->where('code','>=',$this->code);
}
}
It is working perfectly and giving me correct data.
However, in the User table there is a "password" column. The clients want me to show strings like "*****" instead of showing the encrypted password. If no password is set then show ""(a blank string).
To illustrate it better, my current output is like,
How can I change my query function in such a way that I get my desired output?