Today I am gonna write about file downloading from a remote source in you FuseTools based mobile applications. About FuseTools FuseTools makes apps development faster, easier and more fun for both designers and developers,to […]
Enabling HTTPS for Your Express App
I am gonna show you the usage of SSL certificates along with Express JS based application. Once you have your private key and certificate, using them in your app is easy. http Server Let’s revisit how we’ve […]
Laravel 5.5 New feature- Fresh Migrations
In Laravel 5.5 a new Artisan command added to migrate: namespace. This is similar to the existing migrate:refresh option, however, rather than rolling back your existing migrations, migrate:fresh drops all the table and […]
Laravel – .env Variables
Laravel utilizes the DotEnv PHP library by Vance Lucas. Using this library we can easily configure the application settings and we can have different configuration values based on the environment where the application […]
JavaScript – How to check number is odd or even
Here is the simple JavaScript code snippet to check if the given number is an odd or even number. Function to check Number Is Odd Or Even
1 2 3 |
function checkEven(val){ return (val%2 == 0); } |
1 2 3 4 5 6 |
val = 9; if(checkEven(val)){ alert("Number is even"); } else { alert("Number is odd"); ] |
PHP – How To Check Number Is Odd Or Even
Here is simple PHP code snippet to check if a given number is odd or even. Check Number Is Odd Or Even
1 2 3 |
function checkEven($val){ return ($val%2 == 0); } |
1 2 3 4 5 6 |
$val = 7; if(checkEven($val)){ echo "Number is even"; } else { echo "Number is odd"; } |
.htaccess Redirect to specific Sub-Domain based on User Agent
You can use mod_rewrite’s RewriteCond directive to redirect user’s to different websites depending on what device they are using. .htaccess Rules Following rewrite rules will redirect iphone, ipad and ipod […]
How To Capitalize The First Letter Of A String In JavaScript
Here is the quick JavaScript code snippet to capitalize the first letter of a string.
1 2 3 4 |
function ucFirst(string) { return string.charAt(0).toUpperCase() + string.slice(1); } |
1 2 |
let string = 'hello world'; console.log(ucFirst(string)); // output: Hello World |
How to Clear cache in Laravel 5
Here I am gonna show you few artisan commands which will help you to clear different caches in your Laravel application. Clear Application Cache To clear application cache use the php artisan cache:clear command.
1 |
php artisan cache:clear |
How to check current installed version of Laravel ?
You can use laravel’s artisan command to check currently installed version of Laravel Framework Version of Laravel Issue below command from your terminal, make sure to be in application root while issuing command. […]