diff --git a/src/Generators/Controller.js b/src/Generators/Controller.js index a3f7224..fc40e6b 100644 --- a/src/Generators/Controller.js +++ b/src/Generators/Controller.js @@ -10,7 +10,7 @@ const utils = require('./helpers') const path = require('path') const Ioc = require('adonis-fold').Ioc const controllerString = require('./strings').controller -const methods = ['index', 'create', 'store', 'show', 'update', 'destroy'] +const methods = ['index', 'create', 'store', 'show', 'edit', 'update', 'destroy'] let Controller = exports = module.exports = {} diff --git a/src/Generators/strings.js b/src/Generators/strings.js index f46e2e8..0c99607 100644 --- a/src/Generators/strings.js +++ b/src/Generators/strings.js @@ -34,7 +34,7 @@ module.exports = {{name}} strings.controller = `'use strict' class {{name}} { - {{index}}{{create}}{{store}}{{show}}{{update}}{{destroy}} + {{index}}{{create}}{{store}}{{show}}{{edit}}{{update}}{{destroy}} } module.exports = {{name}} diff --git a/test/commands.spec.js b/test/commands.spec.js index 1de4304..c557006 100644 --- a/test/commands.spec.js +++ b/test/commands.spec.js @@ -159,6 +159,7 @@ describe('Generators', function () { expect(user.show).to.be.a('function') expect(user.create).to.be.a('function') expect(user.store).to.be.a('function') + expect(user.edit).to.be.a('function') expect(user.update).to.be.a('function') expect(user.destroy).to.be.a('function') }) @@ -171,6 +172,7 @@ describe('Generators', function () { expect(accounts.create).to.equal(undefined) expect(accounts.store).to.equal(undefined) expect(accounts.show).to.equal(undefined) + expect(accounts.edit).to.equal(undefined) expect(accounts.update).to.equal(undefined) expect(accounts.destroy).to.equal(undefined) })