Now that we know why we'd want to use a UUID, I bet you can see that adding one to a bunch of our models make an excellent use-case for a Trait. So, let's dive in and make one. Building Our Trait We'll start with a fresh Laravel project, so go ahead and follow theinstallat...
In order to get the new Laravel app up and running, we will need to add a database connection. Normally this would be a MySQL or PostgreSQL database, but for our demo purpose we can use a SQLite database by creating an empty file calleddatabase.sqlitein our data...
Docker facilitates the development of Laravel applications by eliminating the need to manually install and configure Laravel's dependencies, such as PHP andweb servers(Apache or Nginx). All dependencies already exist as images on Docker Hub, and they can be added to deployment as separate container...
PHPis a popular programming language used for building dynamic web applications. With the release ofPHP 8.4, developers gain access to new features and improvements. For this guide, we will be operating the system asroot, if that is not the case for you, make use of thesudo commandto acqui...
GitHub typically uses an SSH key for communication, but go get clones through HTTPS, thus you must use your login information or a personal token. The Golang FAQ contains some information on this. If you attempt to use go get in a private repository, you will see the same link on your...
Twilio provides an API to retrieve actions made by your Twilio account and to filter them by both time and category. Using that API, in this tutorial, you’re going to learn how to build a small analytics dashboard for your Laravel application. Let's begin! Prerequisites To get the most...
With these in place, you’re ready to start learning PHP. However, I see them as just the initial things you’ll need. You’ll likely want to go further with the following: Docker or Podman If you’re familiar with containerisation (which we all likely are) you might prefer to use ei...
Laravel Migrations There are two methods in a migration class: up and down. The up method is used to create new tables, indexes, or columns in your database. The down method should undo the up method’s effects. You can use the Laravel schema builder to build and edit tables freely in...
Just update the drive to sqlite and set the DB_DATABASE variable to your /project/route/path/./database/relations.db Migrate the Database. php artisan migrate:fresh --seed # I use the seed flag to include some samples in the database. Review the Migrations Review the Models Check the...
The next component required to run Laravel is a database server. This post will install and use the MariaDB database server. To install and use the MariaDB database server, use the instructions below. Open the Ubuntu terminal and run the commands below to install the Maria...