Aniket Magadum
@magadum_aniket
Followers
3K
Following
10K
Media
554
Statuses
3K
π My Mission: Empowering PHP Laravel developers to build exceptional software through valuable insights and knowledge. π Support my mission below! π
Joined July 2016
Hey X, Here is something I would like to share about my journey as a software developerπ I am currently working as a Senior Laravel Developer in an InsurTech startup and leading a team of 10 developers. But I did not think it would go this way when I first started
10
4
68
Hey Laravel Developers π©βπ» You must have used Laravel's HTTP Client to make external API calls to third-party services. But did you know that you can also make async HTTP calls using Laravel's HTTP Client, as it internally makes use of the Guzzle library? Making async HTTP
0
6
61
Hey Laravel Developers π©βπ» Starting with Laravel v12.41.0, we have a new php artisan reload command available in Laravel. This command, by default, is configured to run the php artisan queue:restart command. But the beauty of this command is that in future you can extend this
2
9
99
Hey Laravel Developers π©βπ» Do you know about the recently added pause and continue feature in Laravel Queues? Starting with Laravel v12.40.2, we now have two new commands that let us pause and resume a queue whenever needed. This can be useful in cases where you might want to
0
4
50
Hey Laravel Developers π©βπ» Apart from writing feature tests and unit tests for your Laravel application, sometimes you might also feel the need to automate some manual test cases that you would normally perform at the browser level as well. In that case, I would suggest you
3
10
103
Hey Laravel Developers π©βπ» If you read a lot of code in Laravel, you might have come across the list() function in PHP. I had never used this function before, but recently discovered many use cases where using this function actually reduces a lot of extra code that you might
9
13
99
Hey Laravel Developers π©βπ» Starting with Laravel v12.40.0, we have a new method called daysOfMonth() available for scheduling commands in Laravel. This new method is a quick convenience feature for situations where we want to trigger a command multiple times a month on specific
4
15
108
Hey Laravel Developers π©βπ» One of the most common operations you might be doing while working with Laravel Blade is using a foreach loop to iterate through a collection. But did you know that Laravel provides a $loop variable inside the foreach loop, which contains various
1
4
69
Hey Laravel Developers π©βπ» Recently, I discovered a new package in PHP called seld/jsonlint while trying to discover a way to validate incorrect JSON requests with syntax errors. This package allows us to easily parse and validate JSON and also returns the exact line on which
7
18
146
Hey Laravel Developers π©βπ» You must be aware of the try-catch-finally block, which comes with PHP like any other programming language. But did you know that you can completely omit the catch block and use just try and finally? A useful example of this pattern is ensuring that
1
0
5
Hey Laravel Developers π©βπ» You must be aware of the environment method available on the App class in Laravel, which we can use to conditionally check the environment we are running in. But did you know that there are also Blade directives like @env and @production, which you can
0
0
11
What in life can quickly put you in depression as a developer? Me: When you are assigned a legacy project π
0
0
4
Hey Laravel Developers π©βπ» You must be aware of resolving objects using the Service Container by using the resolve method. But do you know that Laravel allows us to listen to certain events when the binding is being resolved, which can be used to further modify the result of the
0
0
7
Hey Laravel Developers π©βπ» You must be aware of Laravel Telescope and how beneficial it is in development environments. However, Telescope exposes a lot of information about your application and its internals, which can be risky if any external user gains access to it. For that
8
4
52
Hey Laravel Developers π©βπ» You must be aware of binding classes or interfaces to a class or interface in a Service Container. But did you know you can also perform contextual binding of a class or interface, which means that based on the where the binding is resolved it will
1
9
67
Hey, Laravel Developers " You must be aware of the Middlewares that come with Laravel. But often, Iβve noticed many beginners struggle to understand Before (Request) and After (Response) middleware. Basically, before and after middleware depend on when you call the "$next"
1
14
139
Hey Laravel Developers π©βπ» While writing test cases for your application, you might face a situation where you want to test the behaviour of the code for some time in the future or the past. Not to worry, Laravel provides us with various handy methods like travel(), travelTo()
0
2
36
Hey Laravel Developers , You must be aware of how we could bind classes to the container using the bind method. But what if these classes have some dependent primitive value like integer, float and string? Not to worry, Laravel also provides an option to bind these primitive
4
4
92
Hey Laravel Developers π©βπ» Starting with Laravel v12.36.0, we have a new argument available on the HTTP Clientβs pool method called concurrency. By default, the Laravel HTTP Client triggers all the requests in the pool at the same time concurrently. This could be a problem if
0
3
45
Hey Laravel Developers π©βπ» You must be aware of binding singletons and binding interfaces to concrete implementations in your Laravel service providers. However, did you know that you can also perform this binding using class attributes as well? Here is an example code snippet
0
0
11
Hey Laravel Developers π©βπ» Recently, we discussed about the failover driver in the cache Facade. Similarly, Laravel now also has the same type of driver for the queued jobs. This is useful to have in production environments for high availability of certain operations, like say
1
6
44