Nice extension ? you covered some usages here.. Might i add a couple small things to the first file i opened?
https://github.com/Fajuu/flarum-icons/blob/master/js/src/admin/components/IconCreate.js
You should probably move the createRecord method into the component init(), also things like this are probably error-prone:
id: m.prop(0),
elementPath: m.prop(null),
Your defined migration script doesn't define element_path as nullable, so this will fail for some users trying to install. Since you aren't loading any saved data in the eloquent model you should probably just go with something like
this.newIcon = app.store.createRecord('icons');
and then call the save method in your button listener, which you should probably also use conventional means like:
e.preventDefault();
this.loading = true;
this.newIcon.save ( ...
And maybe not best to set is_active
column to default as true
with null values? ` Can't imagine why any blank attributes would be enabled
(if i could) i would mark this as incompatible wiith breaking changes in its migrations + model access alone (havent looked further)