Today, i will show you how to add confirm box before delete item in php. It's always necessary to confirm yes or no about that removing record. If we confirm before delete records it's safe to client that delete right records. So in this post i will show you how to add confirmation popup of jquery and remove item dynamically.
Here, i have simple create "users" table and then list all users with table using bootstrap. Using bootstrap it looks better layout. So added delete button, when user will click on delete button confirm box open and ask to remove or not current item. after click on yes f.....
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:
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:
But we can remove easily using "$locationProvider.html5Mode(true);". Yo.....
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..
<pre class="prettyprint lang-html">
<title>Jquery remove comma from string</title>
Sometimes, we require to remove duplicates value from multidimensional array in our PHP framework php like laravel, codeigniter, zend etc. Today, In this example i going to give you example of get unique values from multidimensional array that way duplicates will be delete.
In this example i have simple multidimensional array with duplicates values array and i will perform to get only unique values from multidimensional. It is possible by core PHP array_map() and array_unique(). It helps to remove duplicates values from multidimensional array.
So, first you can see bellow my multidimensional.....
In this tutorial, I am going to show you how to add remove input fields dynamically in your form using jquery. In this simple example, i give you to add multiple input fields with remove button that way you can remove field if you don't require. In this example i use bootstrap also because layout become pretty good.
In this example, Simply i added two click event of jquery as listed bellow:
<strong>1.add-more Class:</strong> On ".add-more" class that way we can write jquery append code.
<strong>2.remove Class:</strong> On ".remove" class that way we can remove input field.
I also added "copy.....
I was working on my laravel project, i found one issue that too much load my log file when i open and i want to remove that data, i mean hang my system and must need to restart my system. I thought what will issue, but i got it because in my laravel.log<strong class="path">(/storage/logs/laravel.log)</strong> file had big size of data and my text editor can't load and i want to clear that's way i can see other error.
I did search on google at last i found the solution using command, we have to just run command in out terminal or cmd and we can remove all data of log file. So let's fire bellow.....
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>
Sometimes we require to remove white space from given string. So at that time you can delete spaces from string using replace() of core php. replace() will help to replace your blank space or empty space or extra space or trailing space from string that way we can remove. you can do it from bellow example.
<pre class="prettyprint lang-html">
<title>Jquery - Remove white space from string</title>
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.
<pre class="prettyprint lang-php">
$myString = "this is only for you";
$resultString = str_replace(' ', '', $myString);
Sometimes, you may need to remove packages from your laravel application. I mean if you installed package but you don't need now and that useless in your project. you want to remove that useless package from your project that you remove using laravel composer command.
In this posts i am going to give you full example. first i install "illuminate/html" for i want to use like this way using composer command:
<pre>composer require illuminate/html</pre>
Now i don't require anymore "illuminate/html", so you can remove this way:
<pre>composer remove illuminate/html</pre>