Posts

Laravel Artisan: The Command-Line Interface for Your Laravel Application

If you're a Laravel developer, you're probably already familiar with the powerful command-line interface that comes with the framework: Artisan. Laravel Artisan is a powerful set of CLI tools that can help you with everything from generating boilerplate code to database migrations and even job scheduling. In this blog post, we'll dive into some of the most useful Artisan commands and explore how they can make your Laravel development experience more productive and efficient. Getting Started with Artisan To get started with Artisan, simply open up your terminal and navigate to the root directory of your Laravel application. From there, you can run any Artisan command by typing php artisan [command] . The first command you should try is list. This will show you a list of all available Artisan commands. You can also run php artisan help [command] to get more information about a specific command. Generating Boilerplate Code One of the most common tasks in any Laravel ...

Laravel Model

Laravel is a popular PHP framework that makes it easy to build web applications using a modern and expressive syntax. One of the most powerful features of Laravel is its elegant and intuitive approach to working with databases through an Object-Relational Mapping (ORM) system called Eloquent. Eloquent allows developers to interact with databases using PHP objects instead of raw SQL queries, which simplifies the process of creating, reading, updating, and deleting records in a database. At the heart of Eloquent is the Model, which represents a database table as an object-oriented entity. A Model is a PHP class that extends the Illuminate\Database\Eloquent\Model class and defines the structure and behavior of a database table. Each Model contains properties that represent the table's columns, and methods that define relationships between tables or perform data manipulation operations. Creating a Model is easy. You can generate a new Model using the Artisan command-line tool: php a...

Vapor now allows for individual queue concurrency settings, enabling developers to specify the number of concurrent workers for each queue separately.

Developers can configure their Laravel Vapor environment to utilize multiple queues for their application. id: 12345 name: my-project environments: production: queue-concurrency: 100 queues: - default - invoices - mail When deploying a configuration similar to the example above, Laravel Vapor creates three SQS queues (if they don't exist) and sets up an event mapping between each queue and a Lambda function to process the jobs. Although all queues use the same Lambda function to process jobs, which is generally efficient since Lambda picks up jobs almost instantly, this also means that all queues share the function's concurrency configuration. This configuration is either explicitly set using the queue-concurrency option in the vapor.yml file or uses the overall account concurrency by default. Previously, a busy queue consuming most of the allowed concurrency could cause other queues and even HTTP requests to be throttled by AWS. Howe...

Laravel v10 Released

We're excited to announce the release of Laravel 10.0! Building on the enhancements introduced in Laravel 9, version 10.0 brings argument and return types to all application skeleton methods, as well as the stub files used to generate classes across the framework. Additionally, a new, developer-friendly abstraction layer has been added for starting and interacting with external processes. Plus, with the introduction of Laravel Pennant, managing feature flags for your application has never been easier. Check out our official release notes and upgrade guide for a comprehensive breakdown of the latest features and improvements. Here are some of the key highlights: Method Signature and Return Types When Laravel was first released, it made use of all the type-hinting features available in PHP at the time. However, since then, PHP has seen numerous updates, including additional primitive type-hints, return types, and union types. Laravel 10.x takes advantage of these updates by intro...