Sling Academy
Home/PHP/Page 9

PHP

PHP is a popular scripting language for web development. It can create dynamic and interactive web pages by running on the server and sending HTML to the browser. It is free, fast, and flexible,

Laravel: Render links with dynamic href attributes in Blade

Updated: Jan 18, 2024
Introduction Laravel’s Blade templating engine is a powerful tool for constructing your application’s user interface with plain PHP. One common requirement in web applications is to render links dynamically, which involves......

Laravel: How to include an HTML file in Blade template

Updated: Jan 18, 2024
Introduction Laravel’s Blade templating engine is a powerful tool for web developers to bring dynamic content into their web pages using a very readable and flexible syntax. One of the essential features of Blade is the ability......

Laravel Blade: How to Enable Auto-completion in VS Code

Updated: Jan 18, 2024
Introduction Laravel Blade templates offer a powerful and elegant templating engine for PHP developers working with the Laravel framework. However, when it comes to writing Blade templates in Visual Studio Code (VS Code), having......

Laravel Blade: How to Draw Charts from PHP Arrays

Updated: Jan 18, 2024
Introduction In this tutorial, we’ll explore how to visualize data within a Laravel application by drawing charts using Blade, the powerful templating engine of Laravel that combines HTML with PHP. With the increased necessity......

Laravel: Using Stack in Blade Templates

Updated: Jan 18, 2024
Introduction Laravel’s Blade templating engine provides a range of features designed to help developers construct powerful, maintainable web applications. Among these features, Blade’s stack directive offers a method for......

How to assign middleware to routes in Laravel

Updated: Jan 18, 2024
Introduction Middlewares in Laravel are a powerful feature that allows you to filter HTTP requests entering your application. This tutorial will guide you through the process of creating and assigning middleware to routes in your......

How to Sort Middleware in Laravel

Updated: Jan 18, 2024
Introduction Middleware acts as a filtering mechanism in Laravel, handling the HTTP requests to your application. It can perform tasks like authentication, logging, and caching before a request is passed to a specific route/controller.......

Lifecycle of a Laravel request: Explained with examples

Updated: Jan 18, 2024
Introduction The framework Laravel has simplified the development of PHP web applications with its elegant syntax and comprehensive system for handling web requests. In this tutorial, you will get a deep dive into the request lifecycle......

How to Get and Parse Query String in Laravel

Updated: Jan 18, 2024
Introduction Working with web applications often requires dealing with HTTP requests and their associated data. In Laravel, one common task is to retrieve and parse query string parameters from the URL. Query strings are a fundamental......

Laravel: How to Extract Auth Token from Request Headers

Updated: Jan 18, 2024
Introduction When building a web application with Laravel, handling authentication is a crucial part of the process. One common approach is to use tokens to authenticate users, which are typically passed along in the request headers.......

How to Set a Custom HTTP Response Code in Laravel

Updated: Jan 18, 2024
Introduction When building web applications with Laravel, you might encounter situations where you need to return a specific HTTP status code from your routes or controllers. HTTP status codes are standard response codes given by web......

File Response in Laravel: An Example-Driven Guide

Updated: Jan 18, 2024
Introduction Laravel, a robust PHP framework, simplifies the task of handling file responses with its fluent API and expressive syntax. In this guide, we will delve into the process of working with file responses using Laravel’s......