Learn Dash Functions

Learn Dash Documentation 1. Learn Dash Functions a. Get user courses : learndash_user_get_enrolled_courses($user_id) b. Get Lessons id by course id : learndash_course_get_steps_by_type($course_id, ‘sfwd-lessons’) c. Get lesson list : learndash_get_lesson_list($course_id) d. Get Topics list : learndash_get_topic_list($lesson_id, $course_id); e. Check user access for course : ld_course_check_user_access($course_id, $user_id); //@returns true, false

Read More

How to install HTTRACK on Ubuntu 20.04

HTTRACK in a tool to download website for offline browsing. You can easily install this tool on Ubuntu. Just write the following command in your terminal and hit enter. sudo apt-get install httrack Then run the following command to download a website. httrack “https://website-url.com/” -O “/path-to-destnation-directory”

Read More

How to retrieve value from elements in array using jQuery?

I have multiple input fields like so: <input type=”text” name=”card[]”> <input type=”text” name=”card[]”> <input type=”text” name=”card[]”> Users can add or remove these fields as required, therefore the name of the fields is an array. To get length of the array, this works fine: var n = $(“input[name^= ‘card’]”).length; How can I read value from the […]

Read More

PHP Code for checking Internet Connection

Using this simple php function we can detect whether the Internet connection is working or not if the internet connection is working the following function will return bool value of 1 else return blank <?php function check_internet_connection($sCheckHost = ‘www.google.com’) { return (bool) @fsockopen($sCheckHost, 80, $iErrno, $sErrStr, 5); } $test = check_internet_connection(); print_r($test); ?>

Read More

How to change User and Database in Vesta CPanel

Changing user for web and database is very simple in Vesta Cpanel, Only we have to run some command and thats it. So, here is the command by which we can change the User for web and database in Vesta Cpanel. for changing user for Web v-change-domain-owner {DOMAIN} {NEWUSERNAME} For Changing user for Database v-change-database-owner […]

Read More

Laravel – Can’t get session in controller constructor

In latest version of Laravel , Session is not getting in constructor or in Pages. I solved this problem by doing some stuffs You can’t do it by default with Laravel 5.3. But when you edit you Kernel.php and change protected $middleware = []; to the following it wil work. Hope this works!

Read More

How to create template in Laravel

To create a template in laravel go to following folder :- views/layouts and create a file yourtemplate.blade.php and paste the following code @include(‘includes.dashboard.header’) @include(‘includes.dashboard.sidebar’) @yield(‘content’) @include(‘includes.dashboard.footer’) Include word determines the file for header, sidebar and footer then you can create the respective files there   to add the content you can call this template directly […]

Read More