Estimating the development timeline for an API when SQL queries are ready

Estimating the development timeline for an API when SQL queries are ready involves evaluating several factors. Here’s a step-by-step approach: 1. Define API Scope Number of Endpoints: Count how many API endpoints need to be created. Complexity per Endpoint: Consider if endpoints are simple (e.g., a single query) or complex (e.g., require multiple queries or custom logic). Authentication…

Read More

Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted

Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted error in my web application, while accessing a page. To solve this issue, we have to do a configuration change in php.ini of our web server. Follow these steps to update memory limit to resolve this error from the Mac/Ununtu terminal: Determine PHP version from terminal…

Read More

How to get the auto incremented id after adding the data in mysql

 In one of the project we were working on, we had a situation, where we need to add a record to the table of the database. The added record id is auto incremented in database. This id needs to added to another table with some more data. Now the issue here is how to get…

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

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 JWT AUTH only returns TRUE/FALSE instead of the token

When using Laravel JWT authentication, the default behavior is to return a boolean (`true` or `false`) indicating whether the authentication was successful or not. If you want to receive the token upon successful authentication, you might need to customize the authentication response. Here’s how you can modify Laravel to return the token upon successful authentication…

Read More