|
@@ 102-112 (lines=11) @@
|
| 99 |
|
* |
| 100 |
|
* @return void |
| 101 |
|
*/ |
| 102 |
|
public function createHomeController() |
| 103 |
|
{ |
| 104 |
|
$homeController = $this->directory.'/Controllers/HomeController.php'; |
| 105 |
|
$contents = $this->getStub('HomeController'); |
| 106 |
|
|
| 107 |
|
$this->laravel['files']->put( |
| 108 |
|
$homeController, |
| 109 |
|
str_replace('DummyNamespace', config('admin.route.namespace'), $contents) |
| 110 |
|
); |
| 111 |
|
$this->line('<info>HomeController file was created:</info> '.str_replace(base_path(), '', $homeController)); |
| 112 |
|
} |
| 113 |
|
|
| 114 |
|
/** |
| 115 |
|
* Create HomeController. |
|
@@ 119-129 (lines=11) @@
|
| 116 |
|
* |
| 117 |
|
* @return void |
| 118 |
|
*/ |
| 119 |
|
public function createExampleController() |
| 120 |
|
{ |
| 121 |
|
$exampleController = $this->directory.'/Controllers/ExampleController.php'; |
| 122 |
|
$contents = $this->getStub('ExampleController'); |
| 123 |
|
|
| 124 |
|
$this->laravel['files']->put( |
| 125 |
|
$exampleController, |
| 126 |
|
str_replace('DummyNamespace', config('admin.route.namespace'), $contents) |
| 127 |
|
); |
| 128 |
|
$this->line('<info>ExampleController file was created:</info> '.str_replace(base_path(), '', $exampleController)); |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
/** |
| 132 |
|
* Create routes file. |
|
@@ 150-157 (lines=8) @@
|
| 147 |
|
* |
| 148 |
|
* @return void |
| 149 |
|
*/ |
| 150 |
|
protected function createRoutesFile() |
| 151 |
|
{ |
| 152 |
|
$file = $this->directory.'/routes.php'; |
| 153 |
|
|
| 154 |
|
$contents = $this->getStub('routes'); |
| 155 |
|
$this->laravel['files']->put($file, str_replace('DummyNamespace', config('admin.route.namespace'), $contents)); |
| 156 |
|
$this->line('<info>Routes file was created:</info> '.str_replace(base_path(), '', $file)); |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
/** |
| 160 |
|
* Get stub contents. |