current location:Home > Technical Articles > Daily Programming > PHP Knowledge
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
- PHP tutorial MySQL Tutorial HTML Tutorial CSS Tutorial
-
- Learn how to create custom Facades in Laravel
- Laravel Facades: A Convenient Access Point to Services Laravel's Facades offer a streamlined way to interact with services, simplifying access through a user-friendly interface. Initially, the Facade accessor method might seem confusing, but underst
- PHP Tutorial . Backend Development 705 2025-03-06 02:37:12
-
- A Deep Dive into Sessions in Laravel
- When building a Laravel application, you're almost certain that you'll need to handle the session at some point. They are the fundamental part of web development. This article will quickly explain what sessions are, how they work in Laravel, and how you can use them in Laravel applications. We will then go a step further and dive into how to interact with sessions using "session classes" to avoid the common pitfalls I often encounter when dealing with Laravel applications. Finally, we will learn how to test session data in Laravel. What is a conversation? By default, web applications are stateless, meaning requests are usually not aware of each other. Therefore, we
- PHP Tutorial . Backend Development 541 2025-03-06 02:32:13
-
- Customizing Data Transformations with Laravel Casts
- Laravel's custom casts feature allows customized data conversion, beyond the built-in casting capabilities to handle complex data types and business logic. Here is an example of how to format phone numbers using custom casts:
- PHP Tutorial . Backend Development 942 2025-03-06 02:31:09
-
- Dynamic Mailer Configuration in Laravel with Mail::build
- Leverage Laravel's Mail::build for dynamic mailer configuration! This flexible approach simplifies email setup in various scenarios. Basic Usage Creating a dynamic mailer is straightforward: use Illuminate\Support\Facades\Mail; $mailer = Mail::build
- PHP Tutorial . Backend Development 1247 2025-03-06 02:30:09
-
- How to fix 'SQLSTATE[HY000] [2002] Connection refused' Laravel error in GitHub Actions
- GitHub Actions streamlines continuous integration (CI) for GitHub repositories. YAML workflow files automate tasks like testing and deployment. A common Laravel/MySQL CI snag is the "SQLSTATE[HY000] [2002] Connection refused" error, often
- PHP Tutorial . Backend Development 825 2025-03-06 02:29:12
-
- Learn to master Query Scopes in Laravel
- When building a Laravel application, you may need to write queries with constraints that are used in multiple places throughout the application. Maybe you are building a multi-tenant application and you have to constantly add where constraints to the query to filter by user's team. Or maybe you are building a blog and you have to constantly add where constraints to the query to filter if the blog post has been published. In Laravel, we can use query scopes to help us store these constraints neatly in one place and reuse them. In this article, we will study the local query scope and the global query scope. We will learn the difference between the two and how to create your own query
- PHP Tutorial . Backend Development 711 2025-03-06 02:28:09
-
- Route Definition Enhancements in Laravel with Enum Integration
- Laravel's latest update enhances route definitions by directly integrating with PHP's enum functionality. This simplifies route configuration, eliminating the need for manual value retrieval when using enums, leading to cleaner, more maintainable co
- PHP Tutorial . Backend Development 974 2025-03-06 02:27:09
-
- Preserving Collection Keys in Laravel API Resources
- When building an API, Laravel renumbers the index of the resource collection as a number by default. For situations where the original key has meaning, the preserveKeys property maintains the expected data structure. Here is an example of how to use this property in a Laravel application:
- PHP Tutorial . Backend Development 1030 2025-03-06 02:26:09
-
- A guide to Laravel's model events
- Laravel's model events are a very convenient feature that helps you automatically run logic when performing certain operations on your Eloquent model. However, if used improperly, it can sometimes lead to strange side effects. This article will explore what model events are and how to use them in a Laravel application. We will also explore how to test model events and some issues to be aware of when using them. Finally, we'll cover some alternatives to model events that you can consider using. What are events and listeners? You may have heard of "events" and "listeners". But if you haven't heard of it, here's a brief overview of them: #event These are the actions you want to take action on it
- PHP Tutorial . Backend Development 1013 2025-03-06 02:25:14
-
- API Versioning in Laravel 11
- With the release of Laravel 11, the application skeleton was slimmed down to remove extra files that aren't required on every project. Part of that change removed all service providers from the application source code except the AppServiceProvider. A
- PHP Tutorial . Backend Development 508 2025-03-06 02:23:12
-
- Discover File Downloads in Laravel with Storage::download
- The Storage::download method of the Laravel framework provides a concise API for safely handling file downloads while managing abstractions of file storage. Here is an example of using Storage::download() in the example controller:
- PHP Tutorial . Backend Development 1324 2025-03-06 02:22:09
-
- Adding Real Time Chat to Laravel Using Reverb & Vue
- Laravel, a popular PHP framework, gains enhanced real-time capabilities with Reverb, a powerful WebSocket server. This official Laravel package simplifies the integration of real-time features, significantly improving user interaction. What is Larav
- PHP Tutorial . Backend Development 647 2025-03-06 02:20:08
-
- Parameterized Middleware in Laravel
- Laravel's middleware system gains significant flexibility through parameterization, enabling dynamic behavior based on runtime data. This is especially valuable for scenarios like role-based access control, rate limiting, or any situation demanding c
- PHP Tutorial . Backend Development 497 2025-03-06 02:19:08
-
- Collection Customization in Laravel Using CollectedBy
- Enhance Eloquent collection functionality with Laravel's CollectedBy attribute. This attribute offers a streamlined approach to customizing collections for specific model types, promoting cleaner, more maintainable code. Forget overriding the newCo
- PHP Tutorial . Backend Development 652 2025-03-06 02:17:09
Tool Recommendations

