How to Load and pass data to View in Laravel

Laravel follows Model view controller pattern.

    • Controller – Interact with Model and view.
    • Model – Handles database manipulation.
    • View – Display final UI to the user from where it can interact with the application.

Laravel comes with Blade templating engine which makes easier to create pages. Blade view file compiled into plain PHP code.

Blade view files has .blade.php extension.

You can use PHP code in it.

I am assuming you have already created a Laravel project if not then you can view my earlier tutorial.

In this tutorial, I will create a simple application where pass data to view.

How to Load and pass data to View in Laravel

Read more

How to Programmatically File upload from Custom Plugin in WordPress

It easier to implement file uploading programmatically on the custom WordPress plugin using wp_handle_upload() method.

After successfully upload this returns the file path which you can use to store in the MySQL database table or display on the page.

In this tutorial, I create a simple plugin to demonstrate file upload in WordPress.

How to Programmatically file upload from Custom Plugin in WordPress

Read more

Fetch records from MySQL Database with Vue.js and PHP

Data selection is one of the basic requirements when creating a dynamic website.

Mainly data is fetched from the database on page refresh but without page refresh require to send AJAX request.

I am using the Axios package to send the AJAX request.

In this tutorial, I show how you can fetch records from MySQL database using Vue.js and PHP with the Axios package.

Fetch records from MySQL Database with Vue.js and PHP

Read more