querying polymorphic relationship I'm not really expert in backend. I have here some columns of notification table which has been used by a polymorphic relationship in Laravel.
+----+------------------+----------------+
| id | sendto_type      |   sendto_id    | 
+----+------------------+----------------+
|  1 | App\User         |              1 |  
|  2 | App\User         |              2 |   
|  3 | App\Station      |              1 | 
|  4 | App\Station      |              2 | 
+----+------------------+----------------+

I want to query only from sendto_type column that has App\User attribute on it. Is it possible? and if yes, how would I do that.
These  are some columns from the users table which I referred on App\User
+----+------------------+----------------+
| id | firstname        |   lastname     | 
+----+------------------+----------------+
|  1 | dummy            |    imdummy     |  
|  2 | dummy2           |    imdummy2    |   
|  3 | dummy3           |    imdummy4    | 
|  4 | dummy4           |    imdummy3    | 
+----+------------------+----------------+

I tried querying SELECT * FROM notifications WHERE sendto_type = &quot;App\User&quot;. It was successful but returns no result. Please help
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