Posts

laravel localhost xamp SQLSTATE[42000]: Syntax error or access violation: 1055 'saveapp.marketing_ad.id' isn't in GROUP BY

Error: laravel localhost xamp SQLSTATE[42000]: Syntax error or access violation: 1055 'your groupby field' isn't in GROUP BY     In   config/database.php Change   'strict' => true   To   'strict' => false   and clear the cache php artisan config:cache above command plays the main role to solving this error OR In MySql settings change mysql > SET GLOBAL sql_mode =( SELECT REPLACE (@ @sql_mode , 'ONLY_FULL_GROUP_BY' , '' ));

the token could not be parsed from the request jwt error in laravel

Tymon \ JWTAuth \ Exceptions \ JWTException The token could not be parsed from the request  Add this line to your .htaccess file RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

How to add extra condition while login user form in laravel?

How to add extra condition in login form in laravel  First open these folder Yoursite|vendor\laravel\framework\src\Illuminate\Foundation\Auth then find public function login(Request $request) this funcation add these line at the top of funcation  $user = User::where('email',$request->email)->first(); if($user && $user->role!=1){       return redirect()->back()->with('error','You are not an admin.'); } $user->role or any other condition which you want to check then go to view where you will show this error Copy and paste this code  @if($message = Session::get('error'))                         <div class="errorlv">                             <i class="zmdi zmdi-alert-c...

How to create ssh-rsa key or id_rsa key for first time in git?

Your first time with git and github Get a   github   account. Download and install   git. Set up git with your user name and email. Open a terminal/shell and type: $ git config --global user.name "Your name here" $ git config --global user.email "your_email@example.com" Run this command to create keygen $ ssh-keygen -t rsa -C "your_email@example.com" Run this command to print the rsa key and you can copy this key manually $ cat < ~/.ssh/id_rsa.pub Paste your ssh public key into your github account settings. Go to your github   Account Settings Click “SSH Keys” on the left. Click “Add SSH Key” on the right. Add a label (like “My laptop”) and paste the public key into the big text box. Done

Resolved - wordpress pagination adds extra slashes to url in post or category

I am working on blog where pagination is not working correct. All is working but when I click to the next page the url will get a extra slash in the URL, not sure why this is happening but when using the pagination a lot will add every time a new slash to the URL. URL Links are like this: mysite.com/blog/ , mysite.com/blog//page/2, mysite.com/blog///page/3, mysite.com/blog////page/4 You are using this code probably: ===============================  $total_pages = $loop->max_num_pages;     if ($total_pages > 1){         $current_page = max(1, get_query_var('paged'));         echo paginate_links(array(             'base' => get_pagenum_link(1) . '%_%',             'format' => '/page/%#%',             'current' => $current_p...

How to show product catalog in woocommerce based on date descending order?

You can show product catalog in woocommerce based on date descending order. For showing the product based on date descending order or asc order you have to use a filter in your child theme or current theme. Open funcation.php in your theme. You can find funcation.php in the root of your theme. Update this code and this code will replace the soft order of product to based on date descending order. -------------------- add_filter('woocommerce_default_catalog_orderby', 'custom_default_catalog_orderby');   function custom_default_catalog_orderby( $sort_by ) {     return 'date desc'; }

How to Show taxonomies terms on front as colorized or color circle checkboxes in woocommerce woocommerce-products-filter plugin?

Image
You can Show taxonomies terms on front as colorized or color circle checkboxes in woocommerce woocommerce-products-filter plugin? How to show circle instead of name of color in woocommerce woocommerce-products-filter plugin. If you want show color attributes color in circle you in woocommerce-products-filter plugin. You do not need buy an extension. Just do what i say: Open this folder wp-content/plugins/woocommerce-products-filter/views/html_types Open this file from above folder checkbox.php Go to line no 111 and 226. replace this line: echo $term['name']; TO           if($term['taxonomy']=='pa_color'){                             $ars = get_term_meta($term['term_id']);                             $colorp = $a...

How to get color code in woocommerce color attribute by slug in wordpress

You can get color code in wordpress woocommerce color attribute by slug in wordpress. You can use this code wordpress plugin woocommerce-products-filter also By using just simple code. First you need to get the $term['term_id']. This can be array Or object $term->term_id according to your page Use this code then for array: $color_code_array = get_term_meta($term['term_id']); $colorp = $color_code_array['color_value'][0]; // #000111 Use this code then for Object: $color_code_array = get_term_meta($term->term_id); $colorp = $color_code_array['color_value'][0]; // #000111 Now you print echo $colorp; // #000111

How to Rename additional information, description, reviews tab woocommerce in porto theme

Renaming Tabs Use the following snippet to rename tabs. You just create a child theme if you know how to create or just edit the current theme in function.php Add this code at the end /** * Rename product data tabs */ add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 ); function woo_rename_tabs( $tabs ) { $tabs['description']['title'] = __( 'More Information' ); // Rename the description tab $tabs['reviews']['title'] = __( 'Ratings' ); // Rename the reviews tab $tabs['additional_information']['title'] = __( 'Product Data' ); // Rename the additional information tab return $tabs; }

Themify WooCommerce Product Filter shows category disabled if we redirect a page then we choose another category we can not back to previous category.

Themify WooCommerce Product Filter shows category disabled if we redirect a page then we choose another category we can not back to previous category. To solve this problem. go to: /themify-wc-product-filter/includes/class-wpf-form.php Go to line no. 1111 Then replace this line $read_only = 'readonly'; to $read_only = ''; Themify WooCommerce Product Filter - now to enable the filter radio button when a category chooses.

How to hide an email before @ in php?

If you are looking for a function in which you want a code to hide email before @ so just copy and paste this code. function hide_mail($email) {     $mail_part = explode("@", $email);     $mail_part[0] = str_repeat("*", strlen($mail_part[0]));     return implode("@", $mail_part); } Pass email id in it and this will hide the email before @ // *************@gmail.com

How to hide Phone number in PHP with different format?

How to hide phone number in PHP. I am using phone number in pp but i want a function in which i can add star in my phone number so can user can not read a phone number only some number will be visible and some number will be with asterisk. So i created a function in which i have added a code. You can just change the logic and change the format of phone number to hide the number. function stars($phone) { $times=strlen(trim(substr($phone,4,5))); $star =''; for ($i=0; $i <$times ; $i++) {  $star.='*'; } return $star; } // 99******54 above function will print a number like this

My AOC monitor C24V1H curved sound not working?

Image
Today I bought a monitor AOC Curved C24V1H and I did everything but sound not working. What is the problem? Actually this version of AOC C24V1H sound not working because it has no speaker builtin. It has speaker space and audio jack to connect the speaker but it has no speaker. If you will search on the internet and find a PDF file of AOC C24V1H then you will find that there is no built-in Speaker in this monitor. I struggled so much to this then I found that AOC C24V1H does not has a speaker. Hope you found the Answer.

Will you fight for Priyanka Reddy? Priyanka Reddy murder - Time to fight back!

Image
Are women safe in India? 27-year-old veterinarian raped and murdered, charred body found   The scaring sexual assault and burning alive of a young veterinary doctor has shocked the India. Justice for Dr. Priyanka Reddy Here is the full  story As People are saying, that four people had already planned the crime after they had noticed that the  veterinary doctor  had parked her two-wheeler at the Tondu pally toll plaza. Those four people assumed that the doctor(Priyanka Reddy) would come to pick it up later in the evening or at night. Accused then punctured the tyre. Hyderabad Doctor Murder Case As Priyanka Reddy was coming to home from work, after 8:00 pm to pick her Scooty, she noticed a tyre is punctured or flat. She immediately called her sister and said all these thing, who suggested that she leave her Scooty on the same place and take a cab home. Before she could do anything, two men asked her to help, who offered to take her vehicle ...

How to use set_select on a multiple select box in codeigniter?

This is an example of multi select box in codeigniter <select multiple class="form-control" name="city[]" id="city" style="height: 123px !important;">          <?php $cities = getCitieslist();          foreach ($cities as $city) {          ?>                   <option value="<?php echo $city->id?>" <?php if(@in_array($city->id, set_value('city[]'))): ?> selected="selected"<?php endif; ?>>                          <?php echo  $city->fk_name.' - '.$city->description?>                  </option> <?php  } ?> </select> You can take a look above code or In simple code you can select the multiple value <?php if(@in_array($city->id, set_value('city[]'))): ?> select...

How to hide all rows with one ID in JavaScript?

You can hide all rows with same id via this code. Or you can take any action on all element which has the same id. const elementsList = document.querySelectorAll("#hideornot"); const elementsArray = [...elementsList]; elementsArray.forEach(element => {     element.style.display = "none"; // change according your need });

How to read query string value with JavaScript?

To read query string value from the current url with javascript you need to add a function in your head or body section. function getQueryStringValue ( key ) { return decodeURIComponent ( window . location . search . replace ( new RegExp ( "^(?:.*[&\\?]" + encodeURIComponent ( key ). replace ( /[\.\+\*]/ g , "\\$&" ) + "(?:\\=([^&]*))?)?.*$" , "i" ), "$1" )); } Then you can alert or console the value of your query string. Like you have this url in your query string www.example.com/word/?key=value now you can get the value of key string like this. console . log ( getQueryStringValue ( "key" )); or you can alert this alert( getQueryStringValue ( "key" ) );

How to get Redmi Note 5 Pro MIUI 9.5.6 update?

Confirmed! You will get  MIUI 9.5.6 update in your redmi note 5 pro. Redmi Note 5 Pro MIUI 9.5.6 Update Based on Android 8.1 Oreo Announced If you are not getting the update then you can change your  region to Russia than u will got 8.1 update ... On the spot. if you do not know how to change region in redmi note 5 pro then go to setting>additional settings>Region the select country as Russia. Then go to About Phone and check again you will get update. After Update your phone you can change your redmi note 5 pro region back to India. Do not forget to comment in the post if this works. Thanks :)

How to get oreo update in redmi note 5 pro?

Confirmed! You will get Oreo and  MIUI 9.5.6 update in your redmi note 5 pro. Redmi Note 5 Pro MIUI 9.5.6 Update Based on Android 8.1 Oreo Announced If you are not getting the update then you can change your  region to Russia than u will got 8.1 update ... On the spot. if you do not know how to change region in redmi note 5 pro then go to setting>additional settings>Region the select country as Russia. Then go to About Phone and check again you will get update. After Update your phone you can change your redmi note 5 pro region back to India. Do not forget to comment in the post if this works. Thanks :) Redmi note 5 pro Oreo update Question: I did not get Oreo Update in Redmi Note 5 Pro? Question: How to get Oreo Update in my Redmi Note 5 Pro? Question: How to get MIUI 9.5.6  Update in my Redmi Note 5 Pro? Question: How to get Oreo and MIUI 9.5.6  Update in my Redmi Note 5 Pro? Question: Not getting MIUI 9.5.6.0 Globle stable Oreo up...

Wordpress not showing image on firefox showing display none in image css style

Wordpress not showing image on firefox showing display none in image css style Wordpress not showing image or it is showing under image  style="display: none !important; . If you try to remove it and again it add the display:none in your image. Here is the solution. Firefox only loads some images or not showing any image, while other browsers load them all Here is the solution: If you are using Firefox with AdBlock Plus Extension in your browser? If yes, try to disable it and try again. I think that is the proble. If this works, Do not forget to comment on this post