forked from nWidart/laravel-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tests for generating controller in model generator command
- Loading branch information
Showing
3 changed files
with
185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
...mmands/__snapshots__/ModelMakeCommandTest__it_generates_controller_file_with_model__1.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?php return '<?php | ||
namespace Modules\\Blog\\Http\\Controllers; | ||
use Illuminate\Contracts\Support\Renderable; | ||
use Illuminate\\Http\\Request; | ||
use Illuminate\\Routing\\Controller; | ||
class PostController extends Controller | ||
{ | ||
/** | ||
* Display a listing of the resource. | ||
* @return Renderable | ||
*/ | ||
public function index() | ||
{ | ||
return view(\'blog::index\'); | ||
} | ||
/** | ||
* Show the form for creating a new resource. | ||
* @return Renderable | ||
*/ | ||
public function create() | ||
{ | ||
return view(\'blog::create\'); | ||
} | ||
/** | ||
* Store a newly created resource in storage. | ||
* @param Request $request | ||
* @return Renderable | ||
*/ | ||
public function store(Request $request) | ||
{ | ||
// | ||
} | ||
/** | ||
* Show the specified resource. | ||
* @param int $id | ||
* @return Renderable | ||
*/ | ||
public function show($id) | ||
{ | ||
return view(\'blog::show\'); | ||
} | ||
/** | ||
* Show the form for editing the specified resource. | ||
* @param int $id | ||
* @return Renderable | ||
*/ | ||
public function edit($id) | ||
{ | ||
return view(\'blog::edit\'); | ||
} | ||
/** | ||
* Update the specified resource in storage. | ||
* @param Request $request | ||
* @param int $id | ||
* @return Renderable | ||
*/ | ||
public function update(Request $request, $id) | ||
{ | ||
// | ||
} | ||
/** | ||
* Remove the specified resource from storage. | ||
* @param int $id | ||
* @return Renderable | ||
*/ | ||
public function destroy($id) | ||
{ | ||
// | ||
} | ||
} | ||
'; |
80 changes: 80 additions & 0 deletions
80
...odelMakeCommandTest__it_generates_controller_file_with_model_using_shortcut_option__1.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?php return '<?php | ||
namespace Modules\\Blog\\Http\\Controllers; | ||
use Illuminate\Contracts\Support\Renderable; | ||
use Illuminate\\Http\\Request; | ||
use Illuminate\\Routing\\Controller; | ||
class PostController extends Controller | ||
{ | ||
/** | ||
* Display a listing of the resource. | ||
* @return Renderable | ||
*/ | ||
public function index() | ||
{ | ||
return view(\'blog::index\'); | ||
} | ||
/** | ||
* Show the form for creating a new resource. | ||
* @return Renderable | ||
*/ | ||
public function create() | ||
{ | ||
return view(\'blog::create\'); | ||
} | ||
/** | ||
* Store a newly created resource in storage. | ||
* @param Request $request | ||
* @return Renderable | ||
*/ | ||
public function store(Request $request) | ||
{ | ||
// | ||
} | ||
/** | ||
* Show the specified resource. | ||
* @param int $id | ||
* @return Renderable | ||
*/ | ||
public function show($id) | ||
{ | ||
return view(\'blog::show\'); | ||
} | ||
/** | ||
* Show the form for editing the specified resource. | ||
* @param int $id | ||
* @return Renderable | ||
*/ | ||
public function edit($id) | ||
{ | ||
return view(\'blog::edit\'); | ||
} | ||
/** | ||
* Update the specified resource in storage. | ||
* @param Request $request | ||
* @param int $id | ||
* @return Renderable | ||
*/ | ||
public function update(Request $request, $id) | ||
{ | ||
// | ||
} | ||
/** | ||
* Remove the specified resource from storage. | ||
* @param int $id | ||
* @return Renderable | ||
*/ | ||
public function destroy($id) | ||
{ | ||
// | ||
} | ||
} | ||
'; |