Skip to content

Commit

Permalink
Release version 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
adereksisusanto committed Oct 18, 2021
1 parent 103a2de commit 74c6ffc
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 32 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@

All notable changes to the "codeigniter4-snippets" extension will be documented in this file.

Check [Keep a Changelog](https://github.com/adereksisusanto/codeigniter4-snippets/releases/tag/0.1.0) for recommendations on how to structure this file.
Check [Keep a Changelog](https://github.com/adereksisusanto/codeigniter4-snippets/releases/tag/0.1.1) for recommendations on how to structure this file.

## Donate
If this project help you reduce time to develop, you can give me a cup of coffee :)

[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/adereksisusanto?locale.x=id_ID) [![Donate](https://img.shields.io/badge/Donate-trakteer.id-red)](https://trakteer.id/adereksisusanto)

## [Released - 0.1.1] - 2021-10-18

- #### Fixed Bugs Snippets.
- #### Add New Snippets.
- [Controllers](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/CONTROLLERS.md)
- [Request Class](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/CONTROLLERS.md#controller-request-class)
- [Routes](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/ROUTES.md)
- [Presenter](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/ROUTES.md#presenter)
- [Resource](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/ROUTES.md#resource)

## [Released - 0.1.0] - 2021-09-21

- #### Fixed Bugs Snippets.
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ ext install adereksisusanto.codeigniter4-snippets
### Table of Content

- [Controllers](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/CONTROLLERS.md)
- [Controller Resources](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/CONTROLLERS.md#controller-resources) <sup style="color:red">Update</sup>
- [Controller Presenter](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/CONTROLLERS.md##controller-presenter) <sup style="color:red">New</sup>
- [Presenter](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/CONTROLLERS.md##controller-presenter)
- [Resources](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/CONTROLLERS.md#controller-resources)
- [Request Class](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/CONTROLLERS.md#controller-request-class) <sup style="color:red">New</sup>
- [Migrations](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/MIGRATIONS.md)
- [Models](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/MODELS.md)
- [Routes](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/ROUTES.md) <sup style="color:red">New</sup>
- [Placeholders](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/ROUTES.md#placeholders) <sup style="color:red">New</sup>
- [Custom Placeholders](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/ROUTES.md#custom-placeholders) <sup style="color:red">New</sup>
- [Routes](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/ROUTES.md)
- [Placeholders](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/ROUTES.md#placeholders)
- [Custom Placeholders](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/ROUTES.md#custom-placeholders)
- [Presenter](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/ROUTES.md#presenter) <sup style="color:red">New</sup>
- [Resource](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/ROUTES.md#resource) <sup style="color:red">New</sup>
- [Validation](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/VALIDATIONS.md)
- [Validation in Controller](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/VALIDATIONS.md#validation-in-controller)
- [Views](https://github.com/adereksisusanto/codeigniter4-snippets/blob/main/docs/Views.md)
Expand Down
57 changes: 45 additions & 12 deletions docs/CONTROLLERS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
### Alternate Snippets for Controllers

### `[ProjectRoot]/app/Controllers/*.php`
### `[ProjectRoot]/app/Controllers/**.php`

### Table of Content
- [Controllers](#controllers)
- [Controller Resources](#controller-resources) <sup style="color:red">Update</sup>
- [Controller Presenter](#controller-presenter) <sup style="color:red">New</sup>
- [Presenter](#presenter)
- [Resources](#resources)
- [Request Class](#request-class) <sup style="color:red">New</sup>

#### Controllers

Expand Down Expand Up @@ -37,7 +38,7 @@ public function index()
</tbody>
</table>

##### Controller Resources
##### Presenter

<table style="width:100%">
<thead>
Expand All @@ -51,7 +52,7 @@ public function index()
<td nowrap style="vertical-align: top;">

```code
ci4:controller:resources
ci4:controller:presenter
```

</td>
Expand Down Expand Up @@ -93,6 +94,11 @@ public function update($id = null)
// update code
}

public function remove($id = null)
{
// remove code
}

public function delete($id = null)
{
// delete code
Expand All @@ -103,7 +109,7 @@ public function delete($id = null)
</tbody>
</table>

##### Controller Presenter
##### Resources

<table style="width:100%">
<thead>
Expand All @@ -117,7 +123,7 @@ public function delete($id = null)
<td nowrap style="vertical-align: top;">

```code
ci4:controller:presenter
ci4:controller:resources
```

</td>
Expand Down Expand Up @@ -159,11 +165,6 @@ public function update($id = null)
// update code
}

public function remove($id = null)
{
// remove code
}

public function delete($id = null)
{
// delete code
Expand All @@ -172,4 +173,36 @@ public function delete($id = null)
</td>
</tr>
</tbody>
</table>

##### Request Class

<table style="width:100%">
<thead>
<tr>
<th align="center">COMMANDS</th>
<th align="center">RENDERS</th>
</tr>
</thead>
<tbody>
<tr>
<td nowrap style="vertical-align: top;">

```code
ci4:controller:request
```

</td>
<td nowrap>

```php
$this->request->Type('field name');
```

<small>
<strong>Type : </strong>getVar, getGet, getPost, getMethod, isAjax, isCLI, isSecure<br>
</small>
</td>
</tr>
</tbody>
</table>
62 changes: 59 additions & 3 deletions docs/ROUTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
<!-- - [Alternate Snippets for Routes](#alternate-snippets-for-routes)
- [`[ProjectRoot]/app/Config/Routes.php`](#projectrootappconfigroutesphp)
- [Table of Content](#table-of-content) -->
- [Routes](#routes) <sup style="color:red">New</sup>
- [Placeholders](#placeholders) <sup style="color:red">New</sup>
- [Custom Placeholders](#custom-placeholders) <sup style="color:red">New</sup>
- [Routes](#routes)
- [Placeholders](#placeholders)
- [Custom Placeholders](#custom-placeholders)
- [Presenter](#presenter)
- [Resource](#resource)

### Routes
<table style="width:100%">
Expand Down Expand Up @@ -261,3 +263,57 @@ $routes->type('url/(:uuid)', 'ControllerName::index/$1');
<!-- -->
</tbody>
</table>

#### Presenter
<table style="width:100%">
<thead>
<tr>
<th align="center">COMMANDS</th>
<th align="center">RESULTS</th>
</tr>
</thead>
<tbody>
<tr>
<td nowrap style="vertical-align: top;">

```code
ci4:routes:presenter
```

</td>
<td nowrap>

```php
$routes->presenter('url');
```
</td>
</tr>
</tbody>
</table>

#### Resource
<table style="width:100%">
<thead>
<tr>
<th align="center">COMMANDS</th>
<th align="center">RESULTS</th>
</tr>
</thead>
<tbody>
<tr>
<td nowrap style="vertical-align: top;">

```code
ci4:routes:resource
```

</td>
<td nowrap>

```php
$routes->resource('url');
```
</td>
</tr>
</tbody>
</table>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "CodeIgniter4 Snippets for Visual Studio Code",
"icon": "ci4.png",
"publisher": "adereksisusanto",
"version": "0.1.0",
"version": "0.1.1",
"engines": {
"vscode": "^1.53.0"
},
Expand Down
28 changes: 18 additions & 10 deletions snippets/php_controllers.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"body": [
"public function ${1:index}(${2:\\$request})",
"{",
"\t${3:code}",
"\t\\\\${3:code}",
"}$0"
],
"description": "CodeIgniter 4 - Make Controller"
Expand All @@ -16,45 +16,45 @@
"body": [
"public function __construct()",
"{",
"\t\\__construct code",
"\t\\\\__construct code",
"}",
"",
"public function index()",
"{",
"\t\\index code",
"\t\\\\index code",
"}",
"",
"public function show(\\$id = null)",
"{",
"\t\\show code",
"\t\\\\show code",
"}",
"",
"public function new()",
"{",
"\t\\new code",
"\t\\\\new code",
"}",
"",
"public function create()",
"{",
"\t\\create code",
"\t\\\\create code",
"}",
"",
"public function edit(\\$id = null)",
"{",
"\t\\edit code",
"\t\\\\edit code",
"}",
"",
"public function update(\\$id = null)",
"{",
"\t\\update code",
"\t\\\\update code",
"}",
"",
"public function delete(\\$id = null)",
"{",
"\t\\delete code",
"\t\\\\delete code",
"}$0"
],
"description": "CodeIgniter 4 - Make Controler Resources"
"description": "CodeIgniter 4 - Make Controller Resources"
},
"Codeigniter4_Controller_Presenter": {
"prefix": "ci4:controller:presenter",
Expand Down Expand Up @@ -106,5 +106,13 @@
"}$0"
],
"description": "CodeIgniter 4 - Make Controler Presenter"
},
"Codeigniter4_Controller_Request": {
"prefix": "ci4:controller:request",
"lang": ["php"],
"body": [
"\\$this->request->${1|getVar,getGet,getPost,getMethod,isAjax,isCLI,isSecure|}('${2:field name}');$0"
],
"description": "CodeIgniter 4 - Make Controller Request Class"
}
}
16 changes: 16 additions & 0 deletions snippets/php_routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,22 @@
],
"description": "CodeIgniter 4 - Make Routes post()"
},
"Codeigniter4_ROUTES_PRESENTER": {
"prefix": "ci4:routes:presenter",
"lang": ["php"],
"body": [
"\\$routes->presenter('${1:url}');$0"
],
"description": "CodeIgniter 4 - Make Routes presenter()"
},
"Codeigniter4_ROUTES_RESOURCE": {
"prefix": "ci4:routes:resource",
"lang": ["php"],
"body": [
"\\$routes->resource('${1:url}');$0"
],
"description": "CodeIgniter 4 - Make Routes resource()"
},
"Codeigniter4_ROUTES_SUBDOMAIN": {
"prefix": "ci4:routes:subdomain",
"lang": ["php"],
Expand Down

0 comments on commit 74c6ffc

Please sign in to comment.