File Upload with API Platform and Symfony

Handling File Uploads API Platform

In this guide, we will walk you through the steps of how to handle file uploads with API platform and Symfony. The official documentation on file uploads seems a bit convoluted to me and hence this article hopes to make it easy (in layman’s terms)! To many, handling File upload may seem tricky, but is … Read more

JWT Authentication with Symfony

JWT Authentication with Symfony

Configuring JWT Authentication with Symfony can be quite tricky, especially for beginners. We’ll guide you through a step-by-step tutorial getting you up to speed. We use LexikJWTAuthenticationBundle to setup JWT Auth in less than 10 mins. Our setup for JWT Authentication with Symfony Symfony 3.x, 4.x, 5.x FosUserBundle (you may use any other user provider … Read more

Create Custom Twig Filter in under 2 min

Custom Twig Filters

A custom twig filter is required when the available twig filters cannot do the job for you. Base64 encoding and decoding for example, cannot be done using the built-in filters even though these functions exist in pure PHP. So how do you create a custom twig filter in Symfony? Requirements: Symfony 3.4 and above Create … Read more

Routing with Symfony and Vuejs Router

symfony vuejs routing

One of the initial problems you might come across while integrating Symfony and VueJs is probably Routes. How do you handle this Symfony Vuejs routing? How to let Symfony forward the request to Vue Router? Lets quickly get to answering these questions. Forwarding Requests from Symfony to the Vue Router To allow the Vue Router … Read more

Configure Doctrine Multiple target entities

Configure Doctrine Multiple target entities

Many developers are often plagued with questions of the best possible way to handle inheritance mapping or configuring multiple target entities in doctrine. How does one do that? Lets go over a slightly different scenario first to understand the real problem better. Lets say you have 2 entities with their respective fields: Person (id, name, … Read more

Symfony Vue JS Integration in under 10 mins

symfony vue js

Integrating a good front end library like Vue js has become a de facto standard these days. This tutorial aims at integrating Vue js with Symfony backend. Symfony Vue Js integration is one of the best combinations for a trendy App, whether it be a SPA or a traditional Web App. Requirements Symfony 3.4 and … Read more

Generate Sitemap in Symfony in 2 simple steps

Sitemap in symfony

What is a Sitemap? A Sitemap is a XML file that contains a list of URLs on your website that help the Search Engines discover and crawl your website more effectively. Generating a Sitemap in Symfony is one of the trivial tasks one might encounter. There are a few bundles that might help you, although … Read more

File permissions mode 0777 vs 777

file permission mode 0777 vs 777

If the question Whats the difference between 0777 vs 777 file modes? runs through your mind, you’re not alone. Lets find out… A bit of history, I needed to create a directory (using Php). So as per the syntax of mkdir(), I used mkdir(‘/path/to/create/dir’, 777); where the 2nd passed parameter is the file mode. Normally, … Read more

JS File Upload with Dropzone and Symfony

symfony dropzone

Handling File Uploads completely server-side (especially with Symfony) doesn’t usually seem a pretty straightforward task. It requires a lot of tweaking for stuff as simple as displaying the upload progress or even generate thumbnails for images, etc. Besides, the documentation is pretty convoluted in itself. An alternate is to use the simplicity of JS File … Read more