Posts

Symfony 5 dynamic database connection

Image
The other day I was facing a problem to connect Symfony to multiple databases, there is a way to have multiple database connection in the official documentation but in that method you should define all the databases from the start, which means you can only pick a database that already has defined in your controller, you can't just connect to a database in real time. Sometimes, you may need to specify the connection parameters inside the controller itself, for example, you may want to connect to a database where the database name was specified in the URL or you want to insert data into a different databases where the database connection parameters are inside an other database... It's getting complicated, I know! Let's just say in this blog I will show how to connect dynamically to a database inside the controller. Let's start by creating a new PHP class called DynamicConnection.php and add it inside src folder, we can even create a new folder called...

Deploy Symfony 5 on AWS Elastic Beanstalk with CI/CD, The right way of deploying Apps!

Image
I always thought that deploying an app on the server is quite easy! I mean sure you will have some errors, you may spend few hours trying to make things work on the server, you may even do different steps from setting up the server, setting up the database, make code changes, etc and as much as I always enjoyed doing that, we have to admit that this is only valid for small projects. Companies or even small startups are always making changes and adding new features, so it's not smart to waste time each time they want to deploy something new. You may have heard about CI before, maybe CI/CD, so let's see today how we can make things more professional. In this blog I will deploy a Symfony 5 project, same steps should be valid for any other framework, we just have to create our docker container file and make some changes like port mapping... In a more professional context, we should have 2 environments to deploy our app, an environment for production which have the stable ver...

The road to become a Machine Learning expert

Image
I've been fascinated with machine learning for a while, I did follow some tutorials, watch some videos, read some articles but I never find the time to focus on ML and get really good at it! This article will be the story of my road to become a Machine Learning expert. Being a Machine Learning expert is one of my goals for the year 2019. My curiosity about machine learning started the late of the year 2017,  I did follow some tutorials, participate in some ML hackathons, make some ML projects... so here is what I did so far : In the year 2017, I was watching Siraj Raval  Youtube channel, read articles, tried Udacity online course, Andrew ng tutorials... but to be honest, I was having a hard time to understand things, I was at the beginning of the journey and I didn't know the right path to start! This changed after I followed the following course in Udemy:  Machine Learning A-Z™: Hands-On Python & R In Data Science , this course...