How to Get Current URL Inside Blade Templates
In this article, we will discuss how to get the current URL inside Blade templates. We can use the request() global helper function or the Request helper Class. In conclusion, getting the...
In this article, we will discuss how to get the current URL inside Blade templates. We can use the request() global helper function or the Request helper Class. In conclusion, getting the...
Let’s look at how to generate Lorem Ipsum text in VS Code in a quick and simple way. Generate Lorem Ipsum We’re going to use Emmet abbreviation to generate lorem ipsum. VS...
Let’s look at two VS Code features that will help you focus better on writing code. Full Screen You can toggle it by pressing down CTRL + SHIFT + P and typing...
Let’s quickly look at how we can set variables in Blade templates. Here we have some simple HTML where we output the name John Doe. But we want to store this name inside a...
Let’s quickly look at how we can use the ternary operator in Blade templates. Here we have a simple good old if/else statement. If the login route exists, display ‘Yes’; if it doesn’t, display...
Let’s look at how we can check if a route exists in a Laravel project. We’re going to use the has() method from the Route facade. Note that it tries to find the...
Today I would like to share with you the Code Runner extension. Code Runner allows you to run code snippets or files inside VS Code which can be extremely useful. The extension supports JavaScript,...
Sometimes, it becomes difficult to read numbers that contain many digits. For example, 1000 is readable but what about 1000000? Yeap, it becomes pretty tricky to read. In real life, we add commas (...
Let’s imagine the following scenario. You’re working on a monolith or a macroservice project. And a mobile app developer comes to you and says: – Hey, can you help me debug this API endpoint?...
Let’s look at 3 simple methods to check if debug mode is enabled in a Laravel project. Check .env file Let’s start with the first and the most obvious one. Open the...