const gulp = require('gulp');
const fs = require('fs');
const path = require('path');
const watcher = gulp.watch('./pages', { events: ['add'] });
watcher.on('add', function(p, stats) {
const name = path.basename(p, path.extname(p));
fs.writeFileSync(`./controllers/${name}.controller.js`, 'то, что будет в файле');
});
php artisan make:controller PhotoController