Setting of Auto backup of Mysql database in a laravel project

 When we work on any database project, it’s always good to set up autoback of the database on daily basis. We can set up a cron job for backing up a MySQL database in a Laravel project, follow these steps:   1. Create a Laravel Artisan Command Run the following command to create a custom Artisan…

Read More

Do’s and Don’t for a database maintenance

Here I have listed some do’s and don’ts for a database project.   Do’s for a Database Maintenance Project: 1. Regularly perform database backups to prevent data loss in case of system failures or disasters. 2. Monitor database performance metrics such as CPU usage, memory usage, and disk I/O to identify potential bottlenecks. 3. Implement…

Read More

RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1) in git

When I was trying to do a git clone, I got the below error: The error was RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 0) some bytes of body are still expected. Unexpected disconnect while reading sideband packet. Early EOF. I have gone through google to solve this issue. I…

Read More

cvc-complex-type.2.4.a: Invalid content was found starting with element ‘base-extension’. One of ‘{layoutlib}’ is expected Error in Android

We were facing this issue many times when we download project from github. We are using new Android studio. Error was: cvc-complex-type.2.4.a: Invalid content was found starting with element ‘base-extension’. One of ‘{layoutlib}’ is expected.  This is not the gradle issue. When we search this over internet, we get lot of answers as it’s a gradle…

Read More

Seeding: Array[ReflectionException]Class Array does not exist Error while trying to seed the database

While I tried to seed the database in laravel after the migration with the below artisan command, php artisan db:seed I received the below error Seeding: Array [ReflectionException] Class Array does not exist There are a few possible causes for the error message “ReflectionException: Class Array does not exist” that appears when Laravel tries to use a class that it cannot locate.  These include: The class might not have been properly imported or required at the top of the file. The class might not have been properly imported or required at the top of the file. Composer dump-autoload may not be done. I solved this by running the below command: composer update and then run: composer dump-autoload Now run…

Read More

Laravel artisan migrate PHP Fatal error: Cannot declare class, because the name is already in use : Solution

When I was trying to migrate a database in Laravel Project using the ‘php artisan migrate‘, I get the below error: php artisan migrate Migration table created successfully. PHP Fatal error:  Cannot declare class CreatePasswordResetsTable, because the name is already in use in F:\Projects\database\migrations\2023_11_28_102415_create_password_resets_table.php on line 7    7 [Symfony\Component\Debug\Exception\FatalErrorException] Cannot declare class CreatePasswordResetsTable, because the…

Read More