Laravel Polymorphic Relationship allows a model to belong to more than one other model on a single association. We will take an official Laravel documentation example for this tutorial. Let us take the example of “comment” in both posts and videos. Using polymorphic relationships, you can use a single comments table for both of these scenarios. By default, Laravel will […]
Dropzone is a Javascript plugin that provides drag-and-drop file uploads with image previews. It is not dependent on external JavaScript libraries like – jQuery.It is easy to add to the page. Dropzone.js is a jquery plugin, In dropzone.js we can select one by one image and also with a preview. After choosing an image from […]
PHP provides two methods through which a client (browser) can send information to the server. These methods are given below, and discussed in detail: Get and Post methods are the HTTP request methods used inside the <form> tag to send form data to the server. HTTP protocol enables communication between the client and the server where a browser can be […]
Laravel Sanctum authentication tutorial; In this tutorial, we will share how to create or build a secure PHP RESTful API in the Laravel application with the help of the Laravel sanctum package. Likewise, we will explain to you step by step how to test the Laravel Sanctum authentication REST API using the Postman testing tool. […]
PHP string is a sequence of characters i.e., used to store and manipulate text. PHP supports only a 256-character set and so it does not offer native Unicode support. PHP String Functions In this chapter, we will look at some commonly used functions to manipulate strings strlen() – Return the Length of a String The […]
Make REST API in LARAVEL 9 Today I am going to explain how you can make REST API in Laravel 9. In this video, I am going to explain about CRUD Operation using REST API. In this post, we’ll show you how to build a REST API with laravel 9. Before you can proceed with this […]
What is SweetAlert? Sweet Alert is a way to customize alerts in your games and websites. It allows you to change from a standard JavaScript button. We can add buttons, change the color text, and even add additional alerts that change depending on the user. How do you use SweetAlert in laravel blade? Steps to […]
An array stores multiple values in one single variable: Example Introduction: PHP array is an ordered map (contains value on the basis of the key). It is used to hold multiple values of a similar type in a single variable. An array in PHP is actually an ordered map. A map is a type that associates values with keys. This […]
What is Validation? The required field will check whether the field is filled or not in the proper way. Most of cases we will use the * symbol for the required field Validation means checking the input submitted by the user. There are two types of validation are available in PHP. They are as follows − Empty […]
Introduction Cross-Site Request Forgery (CSRF) is a type of attack performed by the attacker to send requests to a system with the help of an authorized user who is trusted by the system. Laravel provides protection against CSRF attacks by generating a CSRF token. This CSRF token is generated automatically for each user. This token is nothing but a random […]