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 command:…

Read More

How to migrate a perticular file in laravel php artisan

 In Laravel, if you need to run the migration for a particular file, you can achieve this by using the –path option with the php artisan migrate command. This allows you to specify the path of the migration file you want to execute. Here’s how you can do it: Locate the Migration File: Find the…

Read More

How to make php artisan to run on different port

When we want to run two servers on the same machine we may need to have two different ports.  We can change the default port for the Artisan development server by two ways.         1. Changing the port number in env file.         2. Through port argument to php artisan command. 1.…

Read More

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

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:Projectsdatabasemigrations2023_11_28_102415_create_password_resets_table.php on line 7    7 [SymfonyComponentDebugExceptionFatalErrorException] Cannot declare class CreatePasswordResetsTable, because…

Read More

Top 10 Coding Languages to Learn to Work in Technology in 2023

Programming languages are obviously very important to software engineers. Programming languages have not only made it simpler for coders to finish their work, but they have also made it possible for organizations to accomplish their objectives in the most effective way possible.  You’ve come to the correct spot if you’re curious about the programming languages…

Read More