Laravel join sql query syntax with where between group by

Its a query to join two tables and get the details in between given date format ,according to month (month wise) and of specific city . sample work Simple SQL query the query in simple SQL to be added in any language . Laravel SQL query the sql query in

magento 1.9 get parent category of category & attribute set name

get the name of parent category $abc = Mage::registry(‘current_category’)->getName(); $_category = Mage::getResourceModel(‘catalog/category_collection’) ->addFieldToFilter(‘name’, $abc) ->getFirstItem(); $categoryId = $_category->getId(); $categoryle = Mage::getModel(‘catalog/category’)->load($categoryId); $catnames = array(); foreach ($categoryle->getParentCategories() as $parent) { $catnames[] = $parent->getName(); } Get attribute set name of the product by id $productle = Mage::registry(‘current_product’); $prodid = $productle->getId(); $attributeSetModel =

Run wordpress in subfolder of domain

To run the website as blog in subfolder of domain i.e you need to change .htaccess . Normal .htaccess file is as follows # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress you have

Set cookies in wordpress

set cookies in wordpress to pop msg if new visitor . in function.php write the code below : function bloggolfoy_set_new_user_cookie() { if ( ! is_admin() && ! isset( $_COOKIE[‘bloggolfoy_new_visitor’] ) ) { setcookie( ‘bloggolfoy_new_visitor’, 1, time() + 3600 * 24 * 10, COOKIEPATH, COOKIE_DOMAIN, false ); } } add_action( ‘init’,

Laravel-date format variable SQL query for API value

given date value in string format , getting error in SQL query , so have to change it into date format in Laravel using Carbon function ( for date time ) laravel controller sample work to get values in json [RestAPI] Carbon function $users = DB::table(‘abctable’) ->select(DB::raw(‘count(*) as count, city’))

how to add image , url in laravel view

add image to view <img src=” {{ asset(‘img/myimage.png’) }} ” > Explaination : here asset is pointed to public folder in laravel , where lies the img folder containing images. Reference : Add url of next page in view <a href=” {{url(‘/main/dashboard’)}} “> click </a> Explaination : here main

#1067 – Invalid default value for ‘time’ – solution

when altering the database table error displays – 1067 – Invalid default value for ‘time’ Solution is : There might be a datetime field with Null and default value 0000-00-00 00:00:00. change the datetime field Null uncheck and default value None Thus you can alter the database now for other

WordPress custom plugin development sample

How to write plugin name in custom coding. Let us consider , we are coding a plugin to show students rank in web page . lets name the plugin rankboard plugin. First create a folder name rankboard in wp-content / plugins folder. 2) create a page named rankboard.php. *** you

Html Signature code sample

Web Mentor Web Developer +91 9000000000 xyz plot 8 lane abc, City name , 04756363 Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution of this information

Laravel install in windows

By Laravel Installer method Install composer In command Line write composer global require “laravel/installer” Now go to path c:/wamp/www in cmd now write further C:/wamp/www laravel new projectname By composer Installer method Install composer Now go to path c:/wamp/www in cmd now write further composer create-project –prefer-dist laravel/laravel

© 2020 Web Mentor . Powered by WordPress. Theme by Viva Themes.