Skip to main content

Posts

Showing posts from December, 2021

How to Create Database Backup in Laravel

In this article, we will discuss "How to Create Database Backup in Laravel" . In this, we are not going to use any additional package. We will create our artisan command for DB backup and schedule the same for daily or our desired time. Database backup is a basic requirement of each project where we use a database. So we maintain the different services to take database backup. Some of the hosting providers, provide us daily backup for databases and files. Create Laravel Project Use the following composer command to install the fresh copy of Laravel. composer create-project laravel/laravel laravel-project --prefer-dist Establish Connection with DB Open the ".env"  file, located at the root of the Laravel project, and update the required DB credentials. DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel8 DB_USERNAME=root DB_PASSWORD=root Create Artisan Command Run the following artisan command on the terminal. php artisan make:command DatabaseBacku...

How to Manage Password Strength - Angular

In this article, we will discuss "How to Manage Password Strength - Angular" . There are multiple ways to implement this feature in your Angular application such as applying pattern validation, creating a password strength meter, or using any existing package. In this example, I'm using the Angular Reactive form. You will learn pattern validation and how to create a password strength meter. Getting Start I'm using StackBlitz to run this example. This is an online IDE, so no need to setup Angular on local and you can share your code with the community. And, I'm assuming you are familiar with Angular, so I'm not adding basic steps in this article such as creating an angular project, adding Reactive form and etc. At the end of this article, we are going to see how to use: Reactive Forms and Validators (In a simple way) Component interactions using @Input and @Output decorators In the example, I will explain to you using two examples both are using RegExp t...