blog logo

The Moe Blog

A blog about programming and technology.

  • Published on

    A Smooth Upgrade With Just a Bump?

    Livewire 3 Upgrade - Moe Dayraki

    Upgrading from Livewire 2 to Livewire 3 has been a seamless process for Laravel developers, thanks to the automated livewire:upgrade command that simplifies the transition. This command efficiently updates components, ensuring compatibility with Livewire 3 without the need for extensive manual intervention. The upgrade to version 3 brings enhanced efficiency and features, reflecting Livewire's commitment to improving the developer experience and empowering users to create dynamic web applications with ease.

  • Published on

    Unit Testing: Enforcing Modularity and Isolation

    Unit Testing - Moe Dayraki

    As software developers, we strive to build applications that are modular, maintainable, and easy to understand. Modularity and isolation are crucial aspects of software design that help achieve these goals. Unit testing, a fundamental practice in software development, plays a significant role in enforcing modularity and isolation. In this article, we will explore how unit testing accomplishes this and why it is essential for programmers.

  • Published on

    Get a Column Type in Laravel

    Moe Dayraki-Laravel getColumnType

    In the realm of web development, working with databases is a ubiquitous task. Laravel, a PHP framework renowned for its developer-friendly features, streamlines database interactions and schema management. One invaluable tool in the Laravel toolkit is the getColumnType method, a secret weapon for peeking into your database schema. In this article, we will delve into the technical details of this method, explore its practical applications, and provide real-world examples to empower developers in harnessing its capabilities.

  • Published on

    Wait..A User Lockout Event in Laravel?

    Moe Dayraki-Laravel lockout

    As a Laravel developer, you're already aware of the framework's robust security features. One such feature is the "Lockout" event, a crucial component of Laravel's built-in authentication system. This event is fired when a user attempts too many login failures, which is a common security measure to thwart brute force attacks. In this article, we'll delve into the Laravel Illuminate\Auth\Events\Lockout event, exploring its properties, methods, and practical use cases.

  • Published on

    Enhancing User Security with Laravel's CurrentDeviceLogout Event

    Moe Dayraki-Laravel currentDeviceLogout

    In today's digital landscape, user security is of paramount importance. Ensuring that user accounts remain protected from unauthorized access is a critical concern for developers. Laravel, the popular PHP web application framework, offers a powerful authentication system that includes a feature known as the CurrentDeviceLogout event. In this article, we'll explore how to leverage this event to enhance user security in your Laravel applications.

  • Published on

    The 'formatLine' Method; Laravel's Custom Notifications

    Moe Dayraki-Laravel formatLine

    Laravel is a popular PHP framework known for its elegant and developer-friendly features. One such feature is the formatLine method within the Illuminate\Notifications\Messages\SimpleMessage class. In this article, we'll delve into the details of this method and explore how it can be used creatively to format notification messages effectively.

  • Published on

    The 'linesif' Method; Laravel's Custom Notifications

    Moe Dayraki-Laravel linesif

    Laravel's robust ecosystem empowers developers to create elegant and efficient solutions for web applications. Among its many features, Laravel offers a powerful notification system that simplifies the process of sending messages via various channels such as email, SMS, and Slack. In this article, we'll explore an exciting aspect of Laravel's notification system by delving into the SimpleMessages class, specifically focusing on the linesIf method. We will discuss how this method can enhance your notification messages by allowing you to conditionally include content based on specific conditions.

  • Published on

    Understanding Laravel's observe Method in Models

    Moe Dayraki-Laravel observe

    In Laravel's Eloquent ORM, the observe method allows you to register observers with your models. Observers are classes that listen for specific events triggered by the model, such as creating, updating, or deleting records. This article will explore the observe method and its usage in Laravel's Eloquent models.

  • Published on

    Laravel's setTouchedRelations() Method for Updating Related Models on Save

    Moe Dayraki-Laravel push

    In Laravel, the setTouchedRelations() method in the Illuminate\Database\Eloquent\Model class offers a powerful way to specify which relationships should be marked as "touched" when saving a model. By using this method, you can effortlessly update the updated_at timestamp of related models along with the main model. In this article, we will explore the details of the setTouchedRelations() method and its practical usage scenarios.

  • Published on

    Laravel's push() Method for Saving Models and Relationships

    Moe Dayraki-Laravel push

    In Laravel, the push() method in the Illuminate\Database\Eloquent\Model class provides a powerful way to save a model and all of its relationships in a single operation. This method not only simplifies the process of saving related data but also ensures data integrity and consistency. In this article, we will delve into the details of the push() method and explore its various use cases.

  • Published on

    Laravel relationsToArray(); Get All the Model's Relations

    Moe Dayraki-Laravel relationsToArray

    In Laravel's Eloquent ORM, the Illuminate\Database\Eloquent\Model class provides a powerful set of methods to interact with the database. One such method is relationsToArray(), which allows you to retrieve the model's relationships in an array format. In this article, we will explore the relationsToArray() method and its usage.

  • Published on

    The Power of getDirty() in Laravel Models

    Laravel Model getDirty - Moe Dayraki

    Laravel, a popular PHP web application framework, is renowned for its elegant and expressive syntax. One of the many features that make Laravel an attractive choice for web developers is its Object-Relational Mapping (ORM) system, Eloquent. Eloquent simplifies database operations by allowing developers to work with databases using object-oriented syntax. In this article, we will explore the getDirty() method in Eloquent, a handy tool that helps developers identify and manage attributes that have been modified since the last database synchronization.

  • Published on

    Integrating Apple Sign In with Laravel Socialite

    Laravel Socialite - Moe Dayraki

    In today's digital landscape, providing users with the convenience of social sign-in options can significantly enhance their experience on your web application. Apple's "Sign In with Apple" is becoming increasingly popular due to its security and privacy features. In this guide, we'll walk you through the process of integrating Apple Sign In with Laravel Socialite.

  • Published on

    Leveraging Task Hooks and HTTP Pinging in Laravel Scheduler

    Laravel Task Scheduler - Moe Dayraki

    In the world of web applications, automated task scheduling is a critical component for keeping your application running smoothly. Laravel, a popular PHP framework, offers a powerful scheduler that allows you to automate tasks like sending emails, processing data, and more. In this article, we'll explore Laravel's task hooks and HTTP pinging features, which provide enhanced control and monitoring of scheduled tasks.

  • Published on

    Unlocking the Power of Full-Text Search with Laravel Scout

    Laravel Request Lifecycle - Moe Dayraki

    Laravel Scout is a powerful tool that seamlessly integrates full-text search capabilities into your Laravel applications. It simplifies the process of indexing, importing, updating, and removing records from your search indexes. In this comprehensive guide, we'll walk you through the key aspects of working with Laravel Scout, with practical examples to illustrate each concept.

  • Published on

    Implementing Polymorphic Relationships

    Laravel Rate Limiting - Moe Dayraki

    In Laravel, polymorphic relationships offer a powerful way to create flexible database associations, particularly when dealing with multiple models that can be linked to a common model. In this article, we will explore how to set up and use one-to-many polymorphic relationships by drawing inspiration from an illustrative example involving posts, videos, and comments. By the end of this guide, you will have a solid understanding of how to implement polymorphism in your Laravel projects.

  • Published on

    Mastering Rate Limiting in Laravel; Controlling Access with Ease

    Laravel Rate Limiting - Moe Dayraki

    Rate limiting is a crucial technique in web application development to ensure that your resources are used efficiently and fairly. Laravel, a popular PHP framework, offers a straightforward and robust rate limiting abstraction that, when combined with your application's caching system, can help you limit actions within specific time intervals.

  • Published on

    Crafting Custom HTTP Error Pages in Laravel

    Laravel Request Lifecycle - Moe Dayraki

    Laravel, a popular PHP framework, provides an elegant and flexible way to build web applications. Part of creating a user-friendly application involves handling HTTP errors gracefully. By default, Laravel offers a set of predefined error pages, but customizing these pages can enhance user experience and align them with your application's design and branding. In this article, we'll explore how to craft custom HTTP error pages in Laravel.

  • Published on

    Demystifying the Request Lifecycle in Laravel

    Laravel Request Lifecycle - Moe Dayraki

    Laravel, a popular PHP web application framework, has gained immense popularity due to its elegant syntax and powerful features. Understanding the request lifecycle in Laravel is essential for every developer looking to harness the framework's capabilities effectively.

  • Published on

    Counting a Model Relations in Laravel

    Laravel Relations Count - Moe Dayraki

    Everywhere I go in Laravel, I find treasures in the Docs! Ofcourse it's not a treasure if it's easily findable but I don't know what to call something precious and usefull other than treasure, lol. One treasure I found is "models' relations count"! Let's jump into it.

  • Published on

    Install a Fresh Laravel 9 & Vuejs 3 Project

    Laravel Loop - Moe Dayraki

    I've always wanted to have a Laravel VueJS project without the need to use Inertia. I'm not saying that Inertia is not good 😟. It's just me being more comfortable with having only Laravel & Vue to work with.

  • Published on

    Don't Forget the Laravel Loop Variable

    Laravel Loop - Moe Dayraki

    The Laravel $loop variable is a powerful variable found inside @foreach. I've been using it a lot lately as I've been working on a lot of data iterations, tables and reports. Let's see how it works and how to use it!😊

  • Published on

    Speed Up Your Development with LocatorJs

    LocatorJS, Browser Plugin

    LocatorJS is a browser extension that lets users click on any component in the browser and view it in their editor. This will speed up the development and make it easier to debug and develop.

  • Published on

    Let's Learn HTML

    Let's Learn HTML - Moe Dayraki

    HTML; the skeleton of every web page you've looked at; refers to HyperText Markup Language and it's the base of what we call frontend development. Today, we'll learn together about elements, tags, attributes, values and content so we can use them while building our websites.

  • Published on

    A Dive In Programming Languages

    Programming Languages - Moe Dayraki

    Have you heard of Miranda, Haskell and C? Let's then take a deep dive into programming languages that are more complicated and/or less used than others.

  • Published on

    A Scan Through Programming Languages

    Programming Languages - Moe Dayraki

    Instead of talking about the best programming language to learn so, you can be rich, we're going to dive into the real deal and talk about the roadmap of the programming languages, the good ones, bad ones, loved and hated ones, famous and unknown ones.

  • Published on

    Apple Event Announcements

    Apple Event - Moe Dayraki

    Apple introduced the iPhone 14, and iPhone 14 Pro alongside the new AirPods Pro. They've also announced the Apple Watch Series 8, the Apple Watch SE (2nd), and the powerful Apple Watch Ultra. The Apple Fitness+ app now works using only iPhone without the need for an Apple Watch.

  • Published on

    Programming, Binary, and 01011

    Moe Dayraki

    There are 10 types of people. Those who know binary and those who don't. When you think about programming, the very first thing that comes to your head is 0s and 1s. What are 0s and 1s and why are they the only language a computer can speak?

  • Published on

    The Moe Article

    Moe Dayraki

    So I've decided to start writing articles about programming, development, and new technologies. Let's check out what this blog is all about.