Tag : Delete


How to remove # from URL in AngularJS?

If you work on AngularJS web application using angular route then you notice one thing. If you click on any hyper links it makes like as bellow: <pre> http://localhost:8000/# http://localhost:8000/#/items http://localhost:8000/#/users </pre> I mean always "#" will be there, But when we live this web application then it should delete "#" from URL, because it makes issue when we share link on facebook or etc. But should look likes: <pre> http://localhost:8000/ http://localhost:8000/items http://localhost:8000/users </pre> But we can remove easily using "$locationProvider.html5Mode(true);". Yo.....

By Hardik Savani | September 18, 2016 | | 571 Viewer | Category : AngularJS
READ MORE

How to remove comma from string in jquery with example ?

Sometimes, we require to remove comma, semicolon, colon etc from string in your jquery code At that time you can simply remove comma using js replace(). Jquery replace() through we can replace comma into empty string that way comma will be remove from jquery string. In this example you can see how it works. It small thing but helpful because this you can also delete semicolon ,colon ,dot etc. So, let's try bellow example and see.. <strong>Example:</strong> <pre class="prettyprint lang-html"> <html lang="en"> <head> <title>Jquery remove comma from string</title> &l.....

By Hardik Savani | August 27, 2016 | | 683 Viewer | Category : Javascript HTML jQuery
READ MORE

Laravel - How to remove foreign key constraint using migration?

Sometimes it can be agreeable to remove a database column that hosts a foreign key relationship, and we add wrong column with foreign key constraint on table, At that time we must remove that column from table. But we can't remove directly using dropColumn() because we did apply foreign key constraint so we should drop foreign key constraint of that column using dropForeign() and then we can delete column using dropColumn(). You can see as bellw migration, first i added migration with wrong column then other migration for remove that column. <strong>Wrong Column Migration:</strong> <pre cla.....

By Hardik Savani | July 1, 2016 | | 924 Viewer | Category : Laravel
READ MORE

How to use soft delete in Laravel 5?

Normally, we remove row from database when delete record from site. But laravel 5 introduce SoftDeletes in models that way we can't remove from database but if remove record from front side then it doesn't show record on front. So we can retrieve record from database if we remove wrong row. How work soft delete, laravel add <strong class="path">deleted_at</strong> column on the table that be default will be null and when we remove then it will place current timestamp, Laravel Model always fetch that record have only <strong class="path">deleted_at</strong> = null. So, how to use in our proje.....

By Hardik Savani | June 21, 2016 | | 1652 Viewer | Category : Laravel
READ MORE

How to find deleted file in git repo history log?

Onetime i was need to check which files i deleted before, When i was working on my laravel application. I was try to find how to show deleted files log from git command. But at last found git command from google search. we can view all deleted file log from our git repository. So, let's fire bellow command. <strong>Command:</strong> <pre> git log --diff-filter=D --summary </pre>

By Hardik Savani | June 10, 2016 | | 314 Viewer | Category : Git
READ MORE

How to remove white space from string in PHP?

Sometimes we require to remove white space from given string. So at that time you can delete spaces from string using str_replace() of core php. str_replace() will help to replace whitespace that way we can remove. you can do it from bellow example. <strong>Example:</strong> <pre class="prettyprint lang-php"> $myString = "this is only for you"; $resultString = str_replace(' ', '', $myString); print_r($resultString); </pre>

By Hardik Savani | May 20, 2016 | | 502 Viewer | Category : PHP
READ MORE

Example of trigger on after delete with update query mysql

Sometimes we need to fire trigger like after delete update some fields of another tables. for example if you have chat_message tables and when remove row on this table then we need to update "remove_counter(remove_counter + 1)" on users table. i did give you bellow example you can see how to write trigger code: <strong class="example">Example:</strong> <pre class="prettyprint lang-php"> delimiter // CREATE TRIGGER add_ban_counter_in_users AFTER DELETE ON `chat_messages` FOR EACH ROW BEGIN UPDATE `users` SET remove_counter = users.remove_counter + 1 WHERE users.id = old.user_id.....

By Hardik Savani | April 5, 2016 | | 719 Viewer | Category : PHP MySql SQL
READ MORE

How to remove particular value from jquery array?

When i was working on my code PHP project, at that time i need to remove specific items value from my javascript array. i did google search and solve that but i would like to share in my site how to remove value from javascript array. so, let's see how to use: <strong class="example">Example:</strong> <pre class="prettyprint lang-js"> var languages = ['php', 'laravel', '.net', 'java', 'c#', 'javascript'] var deleteLanguage = 'laravel'; languages = jQuery.grep(languages, function(value) { return value != deleteLanguage; }); console.log(languages); </pre>

By Hardik Savani | March 23, 2016 | | 465 Viewer | Category : Javascript jQuery
READ MORE

Git remove last commit from local

Git is distributed version control system that is a awesome. when ever you are working with git repository. if you did commit your code in your local system by mistake, then if you want to remove last commit from your project. so let's see following example: <strong class="example">Example:</strong> <pre class="prettyprint lang-php"> git add . git commit -m "change for test" git reset --soft HEAD~ </pre>

By Hardik Savani | March 18, 2016 | | 476 Viewer | Category : Git
READ MORE

How to remove specific value from php array?

When i was working on my code PHP project, at that time i need to remove specific items value from my array. i did google search and solve that but i would like to share in my site how to remove value from array. so, let's see how to use: <strong class="example">Example:</strong> <pre class="prettyprint lang-php"> $myArray = array('php', 'laravel', '.net', 'java', 'c#', 'javascript'); $myArray = array_diff($myArray, array('laravel')); print_r($myArray); </pre>

By Hardik Savani | March 14, 2016 | | 544 Viewer | Category : PHP
READ MORE

    Bootstrap form validation example with demo using validator.js plugin

    Bootstrap form validation example with demo using validator.js plugin

    Open Post

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Open Post

    AngularJS - scroll to a specific element using anchorscroll

    AngularJS - scroll to a specific element using anchorscroll

    Open Post

    Dynamic Autocomplete search using Bootstrap Typeahead JS Example

    Dynamic Autocomplete search using Bootstrap Typeahead JS Example

    Open Post

    Laravel 5.3 - Customize pagination templates example from scratch

    Laravel 5.3 - Customize pagination templates example from scratch

    Open Post

    Laravel 5 - GEO chart example and demo using lavacharts package

    Laravel 5 - GEO chart example and demo using lavacharts package

    Open Post