Best of Laravel — August 2022
- 1
- 2
- 3
Laravel News·4y
How I develop applications with Laravel
The API we are building is a basic to-do style application, where we can add tasks and move them between to do and done. For me, it always begins with a simple command: laravel new todo-api --jet --git. We will create an API because it is something I love doing. The way I work with Laravel is very similar to Domain Driven Design, so there is a little setup.
- 4
- 5
- 6
Laravel News·4y
Vite Livewire Plugin
The Laravel Vite plugin makes it easy to configure Laravel apps to use Vite with Livewire. It allows components to hot reload without losing state when the component's blade file or class changes. You can get started by installing this plugin as an NPM module and following the installation instructions on GitHub.
- 7
Laravel News·4y
Laravel 9.25 Released
The Laravel team released 9.25 with a new string method, mass updating model timestamps with the query builder, and more: Stringable "when not exactly" Anjorin Damilare contributed a whenNotExactly string method that will execute a given callback if the string is not an exact match with the given
- 8
RUBYLAND·4y
Building a Laravel App with TDD
A food ordering app will only have the following features: Search for food Add food to cart Submit order. Calling the remove() method in the Cart class removes an item from the user’s cart session. Running a Test To run tests, execute the following command; this will run all the tests using the PHP Unit test runner: vendor/bin/phpunit This will return the following output.
- 9
Laravel News·4y
Working with Laravel Model Events
Model Observers are a class-based approach to reacting to model events. The biggest drawback of this approach is there is no right way to do this. You can choose any of the above methods, and they will work, but you should choose the one that is right for you and your specific use case.
- 10
- 11
Laravel News·4y
Building your own Laravel Packages
In this tutorial, I will walk through how to start and publish a new Laravel package. We will build a package with an artisan command that will allow us to create Data Transfer Objects in Laravel and PHP 8.1. Alongside this, we will also have a Facade for hydrating Data Transfer objects, herein referred to I usually use the command line composer init as it is an interactive way to set this up.