@@ -10,6 +10,7 @@ Support Package For Tamedevelopers
1010* [ Zip] ( #zip )
1111* [ Time] ( #time )
1212* [ Cookie] ( #cookie )
13+ * [ Hash] ( #hash )
1314* [ Asset] ( #Asset )
1415 * [ Asset config] ( #asset-config )
1516 * [ Asset Cache] ( #asset-cache )
@@ -146,6 +147,8 @@ Visit the Tests/ folder to see more examples.
146147 - [ optional] ` $httponly ` param as ` bool | null `
147148
148149```
150+ use Tamedevelopers\Support\Cookie;
151+
149152Cookie::set('cookie_name', 'value');
150153```
151154
@@ -176,6 +179,32 @@ if(Cookie::has('cookie_name')){
176179}
177180```
178181
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+ ```
179208
180209## Asset
181210- Takes a param as ` string ` path to asset file
@@ -370,20 +399,13 @@ autoload_register(['folder', 'folder2]);
370399
371400## Helpers Functions
372401
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 |
387409
388410
389411## Error Dump
0 commit comments