Git fetch and Git pull are both two different command used by git users to different purpose with your repository. As you know Git is a version control software to track your file changes. It keeps your files changes safe in the repository. There are many commands like git init, git commit, git status, git config, git branch, git checkout, git fetch, git pull, git merge, git add., and git reset etc. You can check more here . Git fetch command The git fetch command c a n use any time to update the remote branches and it will fetch the latest data from the original branches. This command will not make any changes in your local branch. It detect the changes are done in the remote repository or not. And you should run this command before making any git pull request on your local branches. When you will hit the git fetch, it will collect the all commit that specific target branch and store them in your local repo. It will not merge with your current branches. Git pull comm...
This woocommerce redirect functionality will force the user to checkout without going to cart page. When you click on “Add to cart” button then it will automatically redirect you on checkout page and skip the the cart page. We will cover following steps in this turorial. 1) Disable Ajax Option 2) Change the button text 3) Redirect Hook 4) Remove Success Message Disable Ajax Option Go to this path WooCommerce -> Setting -> Product -> General and disable the ajax options Change the button text To change the add to c a rt button text, you need to make filter hook function using “ woocommerce_product_single_add_to_cart_text” function button_text_change( $product ){ return ‘Buy now’; } Redirect Hook Here we will make redirect hook. Means when someone click on add to cart button then it will make redirect to checkout page. Use this add_filter hook “woocommerce_add_to_cart_redirect” and below function to make redirection on checkout. function redir...
First we will see that, what is eloquent in laravel. Then we will see the example for Where condition . What is Laravel Eloquent? Eloquent is an ORM (Object Relation Mapper) and it helps to interact with the database and get the records from the database table according to your query. Eloquent has the ability to insert new records, delete, update records with the built-in very easy functions. Where Condition in Laravel Eloquent Eloquent where condition use to get d a ta from database based the specific conditions. We already knew about SQL query with where condition and it is very long. So eloquent provide you short, fast, easily retrieves data from the database table. We can also add multiple where condition and use them in the query builder. Eloquent Query Syntax where('COLUMN_NAME', 'OPERATOR', 'VALUE') Example: public function index() { $projects = Project::where(“status”, “=”, 1)->get(); dd($projects); } Multiple Where ...
Comments
Post a Comment