Popular Post


How to remove current changes from local system in Git ?

Git remove all current changes, if you did some wrong code in your project and you want to remove from git. then you can simply remove by git checkout command.i mean you did changes in your local system from git. you can use this command. <pre> git checkout . </pre> Try this..

By Hardik Savani | January 9, 2016 | | 389 Viewer | Category : Git
READ MORE

JQuery - how to get attribute value example

If you are new and you want to get attribute value then you can get easily. sometime maybe we also need to get custom attribute value, i mean data attribute value. In following example i give you three way to get custom attribute value in jquery. <strong class="example">Example:</strong> <pre class="prettyprint lang-html"> <html lang="en"> <head> <title>Get Custom Attribute Value</title> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> </head> <body> <a href="example.com" data-id="1" myname="hd">Ex.....

By Hardik Savani | April 14, 2016 | | 389 Viewer | Category : Javascript jQuery
READ MORE

How to check word exist in string or not in PHP?

I want to share this posts because when i was working in my laravel application i need to find word from string, I mean check string contains word or not but i try to do, at last i found two way we can check easily. First one using preg_match and other one strpos() of php predefine. if you have question how to php regular expression match word then you can do this way: <strong>Example 1:</strong> <pre class="prettyprint lang-php"> $str = "Hi, I am from itsolutionstuff.com"; if (strpos($str, "from") !== false) { print_r("Yes, exists"); } </pre> <strong>Example 2:</strong> <pre class="prett.....

By Hardik Savani | May 3, 2016 | | 384 Viewer | Category : PHP
READ MORE

How to get folder path from file path in PHP?

Sometimes, we require to get directory path from Image path or file url in our PHP website or any PHP framework website at that time we can get folder name using php pre-define function dirname. If you ever use this function then you can see as bellow example how it's works. I have one image url like, i want to just get folder path then you can get folder path like this way : <strong>Example:</strong> <pre class="prettyprint lang-php"> dirname('http://localhost:8000/upload/images/test.jpg'); </pre>

By Hardik Savani | July 4, 2016 | | 383 Viewer | Category : PHP
READ MORE

How to add git add remote origin on bitbucket repository ?

when i was working on my laravel project with my friend. both are working on same project, when i changed on many files, he don't know and he changed name of repository on bitbucket and i couldn't push any thing, i told him. He know how can we resolve this issue so i remove my old remote and added new remote url on my existing repository. Finally, i solved my issue, if you also fetch issue like i had then you can just follow bellow command and solve. <strong>Terminal Command</strong> <pre class="prettyprint lang-php"> git remote -v git remote remove origin git remote add origin Bitbucket_Rep.....

By Hardik Savani | July 12, 2016 | | 383 Viewer | Category : Laravel
READ MORE

word wrap break word not working table

If you try with tr or td tag to give word-wrap: break-word style css then it will not affect. When i was try to give word wrap css on my td tag it was not working same as for i did try with span tag but same result. But when i take div tag it was working so if you are give directly on td or span then take div tag inside td tag and give css this way: <strong>Example:</strong> <pre class="prettyprint lang-html"> <td><div style="word-wrap: break-word;width:20px">My Level</div></td> </pre> Maybe this post can help you.......

By Hardik Savani | May 13, 2016 | | 357 Viewer | Category : HTML CSS
READ MORE

MySql comma separated column join in PHP Laravel 5

If we work in big application or project of Laravel Framework, sometimes we require to manage column value into comma separated because we can save memory of database. But if we store comma separated value in column with ids then it's difficult to inner join or left join and get records from another tables. However, SQL provide FIND_IN_SET() for checking value one by one, that way we can also search from comma separated value. FIND_IN_SET() will help to join with tables and we can simply get data. In this post, I will give you full example of how to get data from comma separated column table.....

By Hardik Savani | January 7, 2017 | | 356 Viewer | Category : PHP Laravel MySql SQL
READ MORE

How to get location information from ip address in Laravel ?

Sometimes, we may require to get user information from ip address in Laravel 5 application at that time this article can help to get info from IP. We can get information from IP Address using "stevebauman/location" composer package for Laravel. "stevebauman/location" through we can get info like country Name, country Code, region Code, region Name, city Name, zip Code, iso Code, postal Code, latitude, longitude, metro Code, metro Code. They will provide bellow following details that they can get from IP. So first we require to install "stevebauman/location" composer package by using followin.....

By Hardik Savani | January 11, 2017 | | 347 Viewer | Category : Laravel
READ MORE

Solve - fatal: Unable to create '/myproject/.git/index.lock': File exi

When i was working on my laravel 5 application, i did all the changes i did but when i had gone for push then i found this fatal error. It's not able to create index.lock file in .git folder. I also give full permission to .git folder and also try to remove direct index.lock file from .git directory but same error like as bellow. <strong>Error</strong> <pre> fatal: Unable to create '/var/www/me/theme_backend/.git/index.lock': File exists. </pre> But at last i found how can i resolve this problem, just run bellow command and it will work. <pre class="prettyprint lang-php"> rm -f ./.git/index.....

By Hardik Savani | June 29, 2016 | | 325 Viewer | Category : Git
READ MORE

How to recursively change the permissions of files and directories in ubuntu?

Sometimes, we need to give recursively change the permissions of specific files and directories in ubuntu OS. you can open terminal and run bellow command, so let's try this way : <strong class="example">Example</strong> <pre>sudo find foldername -exec chmod a+rwx {} ";"</pre> Give more specific! <pre>sudo find foldername -type d -exec chmod 755 {} ";"</pre> <pre>sudo find foldername -type f -exec chmod 644 {} ";"</pre>

By Hardik Savani | April 6, 2016 | | 323 Viewer | Category : Ubuntu
READ MORE


    Laravel 5 custom pagination view example

    Laravel 5 custom pagination view example

    Open Post

    Response download with file in Laravel 5.3 example

    Response download with file in Laravel 5.3 example

    Open Post

    Laravel 5 - Generate Captcha code and Validation example using BotDetect package

    Laravel 5 - Generate Captcha code and Validation example using BotDetect package

    Open Post

    How to check current password using hash check in Laravel 5.3?

    How to check current password using hash check in Laravel 5.3?

    Open Post

    Jquery - Show hide password in Password textbox using checkbox.

    Jquery - Show hide password in Password textbox using checkbox.

    Open Post

    How to get Instagram followers count using JQuery Ajax?

    How to get Instagram followers count using JQuery Ajax?

    Open Post