module.exports = bookshelf.Model.extend({
  tableName: 'skills',

  users: function () {
    return this.belongsToMany(User, 'skills_users')
  }

}, {

  find: function (nameOrId, opts = {}) {
    if (!nameOrId) return Promise.resolve(null)

    const where = isNaN(Number(nameOrId))
      ? {name: nameOrId}
      : {id: nameOrId}

    return this.where(where).fetch(opts)
  }
})

@@ -243,22 +243,12 @@
     
-const where = 
+if (
 isNa
@@ -270,23 +270,80 @@
 Id))
+)
+ %7B
 %0A      
-? %7Bname:
+return Skill.query(qb =%3E qb.whereRaw('lower(name) = lower(?)',
  nam
@@ -351,33 +351,35 @@
 OrId
-%7D
+))
 %0A      
-: %7Bid: nameOrId%7D%0A
+.fetch(opts)%0A    %7D
 %0A   
@@ -390,24 +390,32 @@
 urn 
-this
+Tag
 .where(
-where
+%7Bid: nameOrId%7D
 ).fe

make Skill.find case insensitive