Mastering Database Seeding in Laravel: A Step-by-Step Tutorial

Database seeding in Laravel is an essential process that facilitates the insertion of dummy or sample data into a database.

The purpose of seeding is to streamline development by eliminating the need to write individual SQL statements for populating database tables. Laravel offers a convenient method to create and maintain seeder files.

One significant advantage of database seeding is the ability to test an application without entering real data. By populating the database with mock information, developers can ensure the proper functioning of their code.

This article pre­sents a step-by-step guide­ on how to create and exe­cute a seed file­ in Laravel 10.

Mastering Database Seeding in Laravel: A Step-by-Step Tutorial

Read more

How to check Username Availability using JavaScript and PHP

When creating an online community, website, or social profile, it can be challenging to come up with a username that’s not already taken.

If the username is available, then the user can proceed with registration. If it isn’t, then the user must have to try again with a new username until they find one that is available.

This post will help you check username availability using JavaScript and PHP.

I am using the MySQL database in this tutorial.

How to check username availability using JavaScript and PHP

Read more

How to Upload And Store File To PostgreSQL with PHP

Database is used to store and maintain data. Based on stored data generate report, perform actions, etc.

You can also use it to manage the collection of related files. For this, you can either create a new table or update the existing table to store file information.

In this post, I will show you how to upload file and store to PostgreSQL database with PHP.

How to Upload And Store File To PostgreSQL with PHP

Read more

How to Delete file from public folder – Laravel 9

If you allow the users to upload profile,  product, items photos, or documents and during updating file process if you are not deleting the previously uploaded file then in that case files keep getting stored and occupying space on the server.

In this tutorial, I am only covering file deletion not file upload. You can view this tutorial for file upload in Laravel.

How to Delete file from public folder - Laravel 9

Read more