Author: admin

Laravel Resource Controller

How to Creare Resource Controller You can create the resource controller using following artisan command

This resource controller will have the CRUD methods as shown in the following table Verb URI Action Route Name GET /products index products.index GET /products/create create products.create POST /products store products.store GET /products/{product} show products.show GET /products/{product}/edit edit products.edit […]

Read more

Laravel RESTful API Development

These days REST API plays major role in web development and developers are heavily use REST API when they build applications. REST is very popular because it is very simple to use and you can build it on top of the HTTP. What is REST? REST stands for Representation State Transfer. We will try to […]

Read more

How to get category of current post

Following code can be used to get the category of the current post which you are dealing with You can use the get_the_category( $post->ID ) to get the category. What you have pass here is the ID of the post. You can get the ID of the post using the $post global variable

Use […]

Read more

Javascript forEach Example

I have a Javascript array with products and its name is product_table. Product is Javascript object type and it will have following look

So product_table will have different types of products. So i can add new product to product_table using push method product_table.push( ) How do you prevent adding duplicate products to product_table instead […]

Read more

How to get subcategory of category in WordPress

When you develop WordPress plug-in widget etc you will have to get subcategory of a given category. You can use the following code to get the subcategory We are going to use get_terms($taxonomies, $args) function. If you want to learn more about this function please have look at the code reference

Read more

Vue js Wrapper Component

When you integrate your Vue.js with third party component you have to use technique called Wrapper Component. In this article we will see how we can use jQuery plugin inside the Vue I will integrate Select2 https://select2.org/ with Vue If you use jQuery you can use the following code in your javascript code so that […]

Read more

Vue-Pass DOM elements to child component with SLOTS

In Vue.js SLOTS can be used to pass DOM elements to child components. This is very easy concept to understand with following example. In your child component template you have to use

where your parent component can inject the DOM elements

Read more

Javascript Lib

Date Range Picker

Read more

How to use vue resource to upload file

In this article we will study how we can use vue-resource library to upload file to the back-end server. I am using following HTML template to start. I have used following scripts in header section of the HTML

First one is for the Vue The second script for the vue-resource which I use to […]

Read more

How to post array of data to the server in your Vue app

When you develop the Vue application you will have to post array of data to the REST API url given to you Suppose you are going to make a invoice with several products as shown in the following HTML code

Now I want to submit this HTML table Server I have update_products function inside […]

Read more