11<?php
22/**
33 * This file is part of laramoud package.
4- *
4+ *
55 * @author Rifqi Khoeruman Azam <pravodev@gmail.com>
6- *
7- *
6+ *
7+ *
88 * For the full copyright and license information, please view the LICENSE
99 * file that was distributed with this source code.
1010 * Copyright © 2019 PondokIT. All rights reserved.
1111 */
12+
1213namespace Pravodev \Laramoud \Commands \Generators ;
1314
1415use Illuminate \Console \Command ;
@@ -45,15 +46,15 @@ public function __construct()
4546 public function handle ()
4647 {
4748 $ this ->call ('make:migration ' , [
48- 'name ' => $ this ->argument ('name ' ),
49- '--create ' => $ this ->option ('create ' ),
50- '--table ' => $ this ->option ('table ' ),
51- '--path ' => $ this ->getMigrationPath (),
52- '--realpath ' => $ this ->option ('realpath ' )
49+ 'name ' => $ this ->argument ('name ' ),
50+ '--create ' => $ this ->option ('create ' ),
51+ '--table ' => $ this ->option ('table ' ),
52+ '--path ' => $ this ->getMigrationPath (),
53+ '--realpath ' => $ this ->option ('realpath ' ),
5354 ]);
5455 }
5556
56- /**
57+ /**
5758 * Get migration path (either specified by '--path' option or default location).
5859 *
5960 * @return string
@@ -62,6 +63,7 @@ protected function getMigrationPath()
6263 {
6364 $ path = $ this ->option ('path ' ) ?: '/database/migrations ' ;
6465 $ module_path = $ this ->getConfig ('module_path ' , 'composer ' ) ?: 'modules/ ' ;
66+
6567 return $ module_path .$ this ->argument ('module_name ' ).$ path ;
6668 }
6769}
0 commit comments