Laravel-4-Generators
Laravel-4-Generators copied to clipboard
Generate with workbench.
Could i generate it with workbench? For example i have workbench structure:
app/
.......
workbench/
myvendor/mypackage/src/
Myvendor/Mypackage/
controllers/
migrations/
seeds/
models/
views/
route.php
Please example for me.
+1
i need generate operations through the workbench, "--Path" is not the fastest way.
This would indeed be very handy. +1
Me gusta +1
fix this by write these lines:
this steps applied to view command, you can do these steps to other commands.
open: {laravel}\vendor\way\generators\src\Way\Generators\Commands\ViewGeneratorCommand.php 1- find method named: getFileGenerationPath() 2- add this snippet before return statement :
if ($this->argument('workBench') !== FALSE) {
$workBench = base_path() . '/workbench/' . $this->argument('workBench') . '/src/views';
return sprintf('%s/%s.blade.php', $workBench, $viewName);
}
3- find method named: getArguments() 4- append flowing array element to returned array :
['workBench', InputArgument::OPTIONAL, 'Work Bench path ex:vendor/package' , FALSE]
5- My English is poor :)
+1 on this! Would be really awesome!!