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-circle"></i> {{ $message }}                         </div>                         @endif

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_page,             'total' => $total_pages,             'prev_text'    => __('« prev'),             'next_text'    => __('next »'),         ));     }    } ====

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 = $ars['color_value'][0];                             ?>                             <style type="text/css">                                 .pcirclecolor {                                     height: 30px;