@@ -10,6 +10,7 @@ Support Package For Tamedevelopers
10
10
* [ Zip] ( #zip )
11
11
* [ Time] ( #time )
12
12
* [ Cookie] ( #cookie )
13
+ * [ Hash] ( #hash )
13
14
* [ Asset] ( #Asset )
14
15
* [ Asset config] ( #asset-config )
15
16
* [ Asset Cache] ( #asset-cache )
@@ -146,6 +147,8 @@ Visit the Tests/ folder to see more examples.
146
147
- [ optional] ` $httponly ` param as ` bool | null `
147
148
148
149
```
150
+ use Tamedevelopers\Support\Cookie;
151
+
149
152
Cookie::set('cookie_name', 'value');
150
153
```
151
154
@@ -176,6 +179,32 @@ if(Cookie::has('cookie_name')){
176
179
}
177
180
```
178
181
182
+ - or -- ` Helpers Function `
183
+ ```
184
+ TameCookie()->set('user', '__user');
185
+ ```
186
+
187
+ ## Hash
188
+ - Password hashing and verify
189
+
190
+ ```
191
+ use Tamedevelopers\Support\Hash;
192
+
193
+ bcrypt('testPassword');
194
+ or
195
+ Hash::make('testPassword');
196
+
197
+ // $2y$10$Frh7yG3.qnGdQ9Hd8OK/y.aBWXFLiFD3IWqUjIWWodUhzIVF3DpT6
198
+ ```
199
+
200
+ ### Password verify
201
+ ```
202
+ $oldPassword = "$2y$10$Frh7yG3.qnGdQ9Hd8OK/y.aBWXFLiFD3IWqUjIWWodUhzIVF3DpT6";
203
+
204
+ Hash::check('testPassword', $oldPassword)
205
+
206
+ password_verify('testPassword', $oldPassword);
207
+ ```
179
208
180
209
## Asset
181
210
- Takes a param as ` string ` path to asset file
@@ -370,20 +399,13 @@ autoload_register(['folder', 'folder2]);
370
399
371
400
## Helpers Functions
372
401
373
- | function name | Description |
374
- | ---------------------------| -----------------------------------------------|
375
- | autoload_register() | Same as ` AutoloadRegister::load() ` |
376
- | env() | env method ` To get environment variable ` |
377
- | env_update() | Same as ` Env::updateENV ` method |
378
- | server() | Return instance of ` (new Server) ` class |
379
- | tasset() | Return Absolute path of asset. Same as ` Asset::asset() ` |
380
- | config_asset() | Same as ` Asset::config() ` . Configure Asset root directory |
381
- | base_path() | Get absolute base directory path. It accepts a param as ` string ` if given, will be appended to the path |
382
- | directory() | Same as ` base_path() ` just naming difference |
383
- | domain() | Similar to ` base_path() ` as it returns domain URI. Also accepts path given and this will append to the endpoint of URL. |
384
- | to_array() | ` array ` Convert value to array |
385
- | to_object() | ` object ` Convert value to object |
386
- | to_json() | ` string ` Convert value to json |
402
+ | function name | Description |
403
+ | ------------------| -----------------------------------------------|
404
+ | env() | env method ` To get environment variable ` |
405
+ | server() | Return instance of ` (new Server) ` class |
406
+ | to_array() | ` array ` Convert value to array |
407
+ | to_object() | ` object ` Convert value to object |
408
+ | to_json() | ` string ` Convert value to json |
387
409
388
410
389
411
## Error Dump
0 commit comments