querying polymorphic relationship
your query should work in mysql


CREATE TABLE notification (
  `id` INTEGER,
  `sendto_type` VARCHAR(11),
  `sendto_id` INTEGER
);

INSERT INTO notification
  (`id`, `sendto_type`, `sendto_id`)
VALUES
  ('1', 'App\User', '1'),
  ('2', 'App\User', '2'),
  ('3', 'App\Station', '1'),
  ('4', 'App\Station', '2');

CREATE TABLE user (
  `id` INTEGER,
  `firstname` VARCHAR(6),
  `lastname` VARCHAR(8)
);

INSERT INTO user
  (`id`, `firstname`, `lastname`)
VALUES
  ('1', 'dummy', 'imdummy'),
  ('2', 'dummy2', 'imdummy2'),
  ('3', 'dummy3', 'imdummy4'),
  ('4', 'dummy4', 'imdummy3');




SELECT n.id,u.* FROM notification n inner JOIN user u ON  u.id = n.sendto_id WHERE `sendto_type` = &quot;App\User&quot;


id | id | firstname | lastname
-: | -: | :-------- | :-------
 1 |  1 | dummy     | imdummy 
 2 |  2 | dummy2    | imdummy2


db&lt;&gt;fiddle here