What is Laravel?

Laravel is a free, open-source framework built on PHP, that helps developers create highly custom websites and web apps.
Laravel logo

A brief introduction to Laravel

Laravel is a PHP framework for building web applications, designed with a strong emphasis on the developer experience. For less technical folk, think of Laravel as a pre-built foundation and set of blueprints for PHP developers. Instead of coding everything from scratch (like login systems, databases, security, etc.), Laravel gives developers tools, structure, and shortcuts so they can build much faster, more securely, and in a more organized way.

Describing itself as a framework for ‘web artisans’, Laravel feels like a carefully crafted experience, as opposed to just another tool. Its primary focus on the developer experience means significant effort has been made to ensure developers find joy in working with Laravel, making the most of its built-in, time-saving features while still having the flexibility to implement custom solutions. 

Laravel code snippet in PHP demonstrating a route returning a user view function

While Laravel almost always offers a recommended approach in the official documentation, it still allows developers the freedom to take alternative routes when needed. To support development, there are also numerous starter kits and a rich ecosystem of first-party tools available. Compared to low-code or no-code platforms, Laravel offers a refreshing level of implementation freedom, but it’s still much faster than traditional coding.

Projects are typically managed through an Integrated Development Environment (IDE) like Visual Studio Code. While Laravel can run on any computer with PHP installed, production deployments are usually run on Linux, most commonly Ubuntu. 

Nevertheless, over the years, numerous tools and services have emerged to simplify deployment. As a result, launching a PHP web application using Laravel has become more accessible than ever, even for those with little to no experience in server management. While some familiarity with PHP, CSS, and JavaScript is of course recommended, there is a rich ecosystem of both first and third-party plugins available to support development for those who aren’t experts.

Laravel page displaying numerous "packages" of first and third-party plugins

Now, if there’s one thing Laravel is famous for, it’s its documentation. Every aspect of building and running a web application is thoroughly explained in clear, accessible language, all whilst recommending ‘best practice’ approaches. While developers can dive deeper into specific topics, the documentation remains approachable and easy to follow and is supported with an extensive free video library. As a result, developers are well-equipped to build robust, secure, and user-friendly web applications according to best practices. For those who prefer video content over reading, Laravel also has an extensive library of video tutorials on Laracasts

Who is it good for? In short, Laravel is ideal for developers who want to build quickly, securely, and enjoyably - without sacrificing flexibility or best practices. But, it’s not a closed door to less experienced coders; thanks to its helpful tools and clear instructions, it can be utilised by those who know some PHP and want to have a go at building custom websites and web-apps.

Key features and limitations

The Eloquent Feature (Object Relational Mapping)

🛠️
The summary: Working with databases is simplified with Laravel’s Eloquent feature, which makes working with databases easier and safer by letting developers interact with data using simple, readable code instead of complex SQL. 

If you’ve ever worked with databases, you probably know how even the slightest typo can prevent queries from running, or worse, lead to disastrous consequences for your data. Laravel comes with its own library called the Query Builder. This can be used on its own, directly with your database tables, but Eloquent provides even further simplification. It’s essentially an abstraction layer built on top of Laravel’s Query Builder, acting as a middleman that enables you to map your models to database tables. 

This principle is also known as Object-Relational Mapping (ORM). Since Laravel follows the Model-View-Controller (MVC) pattern, you typically work with models that represent specific entities, for example ‘Users’. Laravel’s Object-Relational Mapper (ORM) bridges the gap between these model files and the actual database entries, which ensures seamless interaction and compatibility between the two.

Eloquent allows you to query data related to a specific model. In fact, you won’t even notice it’s there, since it’s baked into models by default. Because you define key database properties in your model - such as the table name and primary key - you can use methods like User::find(1) to retrieve the user in your database with an ID of 1. Later, if you change your table or primary key, this function will continue to work without needing to be modified This can make them easier to maintain than raw database queries, which would need to be updated wherever these details are referenced. 

Laravel Eloquent code snippet in PHP showing User::find query returning a user’s name.
Convert your queries into SQL

The largest benefit of using Eloquent is that you don’t need to worry about the underlying SQL. In fact, when using Eloquent you’re not tied to any specific database management system. If you were to switch from PostgreSQL to Microsoft SQL Server (both using a different syntax), in most cases you wouldn’t need to change any of your queries, because Laravel converts them behind the scenes into actual SQL

Autocompletion feature

Eloquent is also rendered extremely useful by its autocompletion: whenever you want to use a function but are unsure of its name, a small list shows you the available functions. Apart from being highly convenient, this also makes your code more reliable, as it keeps you in check with stricter structure and helps prevent bugs. 

Laravel autocompletion in code editor suggesting available where methods for Eloquent queries with documentation.
Filtering mechanism: preventing SQL injection

A final, and often-overlooked benefit of using Eloquent, is it helps prevent SQL injection. Whenever an end user (trusted or untrusted) provides input that you will insert into your database, you need to ensure that the SQL cannot be tampered with before it gets executed. To mitigate this potential vulnerability, Laravel leverages a technique from PHP’s own database adapter called parameterization, ensuring that any data intended for insertion or updating is treated separately from the query itself. This filtering mechanism runs automatically behind the scenes, so there's no need for any manual actions to protect data.

Careful: shortcutting SQL writing isn’t always a good thing

However, a potential drawback of using Eloquent is that it abstracts away the need to understand SQL, the language used for database interactions. While this is convenient, especially for newcomers, it can be a double-edged sword. Since you're primarily using PHP methods like ‘User::find()’ instead of writing raw SQL, you may not fully grasp what is happening under the hood. While this isn’t necessarily a problem in most cases, there may come a time when you need to write custom SQL queries, and relying too heavily on Eloquent could make this more challenging. 

That being said, in practice, Eloquent is an extremely powerful abstraction layer, and its benefits often far outweigh any drawbacks.

Blade (Laravel’s templating engine)

🛠️
The summary: For building user interfaces, Laravel offers Blade, a templating engine that keeps front-end code clean and reusable, while also including built-in security features like protection against common attacks.. Serving as the “V” in “Model-View-Controller,” Blade compiles the actual HTML served to the end user. It provides a more fluent way to work with PHP variables, loop through lists, and combine other Blade files most often to serve as components. Additionally, it offers various utilities to handle common requirements, like checking if a user is logged in, validation errors, but also security measures. 

Generally speaking, using Laravel Blade allows you to get up and running much faster than using reactive frameworks like Vue.js or React, as it requires fewer installations and avoids complex JavaScript-specific syntax. In fact, you can always fall back on plain HTML when needed. This makes Laravel Blade particularly accessible to newcomers.

Laravel Blade template code snippet displaying users in an HTML table with conditional logic.

While numerous web applications have been built on the client side using JavaScript frameworks like Vue.js or React, the trend now seems to be shifting back toward more server-side approaches, something Laravel has embraced from the beginning through Blade. Smaller, lightweight JavaScript libraries like Alpine.js or Laravel Livewire are increasingly being used to sprinkle interactivity. This keeps the bulk of your app logic on the server-side in Laravel, minimizes front-end dependencies, and avoids heavy reliance on NPM.

Apart from these front-end assets, the core language of Blade is mostly markup, primarily HTML with a peppering of PHP where necessary. However, frameworks like Laravel are all about reducing repetitive work, and for certain structures and logic you can use separate Blade files and include them as components. The biggest advantage of using components is that you follow the ‘Don’t Repeat Yourself’ (DRY) principle. Additionally, components allow for flexibility - you can tweak them based on your requirements by passing properties, such as a heading for a panel, or by dynamically swapping out content using slots. This makes it easy to reuse parts of your HTML and PHP.

Laravel Blade component code snippet displaying user details with slot properties for reusable layout.

Laravel is certainly built with security in mind when it comes to the user interface, with built-in safeguards to prevent issues like CSRF (Cross-Site Request Forgery) and XSS (Cross-Site Scripting), which provides simple and effective protection against unauthorized script execution.

An unfortunate drawback of Laravel Blade is that it isn’t designed for interactivity, but rather for serving static content. While packages like Laravel Livewire can add dynamic behavior, they are still somewhat limited in terms of capabilities and speed compared to fully reactive JavaScript frameworks that run entirely on the client side, such as Vue.js

Another potential sticking point is that mixing HTML with PHP, Tailwind CSS, and Alpine.js can make your files verbose and harder to read. Of course, Blade was never intended for interactivity, let alone to replace JavaScript frameworks like Vue.js. However, it's still worth comparing them, as developers will typically choose one or the other for their view logic in a given project, not both at the same time.

Split front and back-end via a REST API 

🛠️
The summary: While Laravel was originally designed as a monolithic framework, handling both the front end and back end, it also provides the flexibility to function as a REST API. This allows you to decouple your front end from your back end, giving you the freedom to use Laravel solely for retrieving and processing data while integrating it with your preferred front-end technology.

When it comes to the Model-View-Controller (MVC) principle that Laravel is built upon, the View layer is typically handled by Laravel Blade, as we discussed earlier. However, there are cases where you may want to use other front-end technologies as your client application, while still relying on Laravel to handle data requests and responses

In these scenarios, you’ll typically work with two separate (sub)domains: one for your client-side application and another serving as your API backend. Whenever your client-side application needs data, it simply sends a request to your API. By default, Laravel allows you to define API routes and even handle user authentication directly from your front-end application.

Laravel Blade component code snippet displaying user details with slot properties for reusable layout.

When serving content via API routes, you'll typically use API Resources, which are essentially PHP files. Think of them as templates that define which data is exposed. In most cases, this data corresponds to a model, such as the User model. In your JSON Resource file, you map specific User attributes to the API Resource, ensuring they are included in every response from your API. Unlike Laravel Blade, which generates HTML markup, API responses typically return JSON, which is suitable for consumption by any other applications or language, like JavaScript.

As mentioned, the main benefit of using Laravel’s API capabilities is that you can create a more ‘framework-agnostic’ way of developing your applications - your application’s back end (Laravel) doesn’t care what front-end framework or language you use to interact with it. Apart from having the freedom to plug-in any technology ‘stack’ for your front-end, it also lets you power multiple applications all at once, no matter what individual language or framework they’re written in. 

Laravel’s API capabilities provide significant opportunities for scalability. If you ever need to change your front-end language or experiment with some shiny and new JavaScript framework, it’s easier to build in parallel as opposed to being limited to a single (monolithic) codebase, as per the default design of Laravel.

When you consider this architecture - leveraging Laravel as your API with a custom front end - there are a few things to keep in mind. One of the main challenges is managing multiple codebases and repositories. While this approach offers significant flexibility, it also comes with additional responsibilities. If you're more comfortable working with a single codebase, it’s recommended to stick with the monolithic approach that Laravel provides by default. However, if your project demands a more diverse and flexible architecture, Laravel’s API capabilities make it entirely feasible to implement. 

Another stumbling block you might encounter is figuring out how to structure your API responses. While you can return any key-value pair by default, as your project grows, it becomes important to standardize your response format to ensure consistency and compatibility with your front-end applications. Laravel doesn’t enforce a strict structure out of the box - instead, it keeps things lightweight and flexible, letting you add structure only when you need it. While this is great for staying agile, it also means it’s easy to overlook proper formatting until it becomes a bigger issue later on.

Wide-ranging ecosystem

🛠️
The summary: While Laravel includes a robust set of built-in libraries for features such as authentication, database queries, mailing, file storage, and more, you can also install additional first-party packages to access more specialized functionality. Additionally, there are many third-party packages available from reputable vendors, such as Spatie, offering further tools and enhancements for your application.

If you’ve ever worked with WordPress, you’re likely familiar with plugins that extend a website’s functionality. Laravel’s ‘packages’, whether first-party or third-party, are installed using PHP’s dependency manager, Composer. While Laravel doesn’t have a centralized plugin directory or an "‘app store’, you can easily find relevant packages on GitHub by searching with keywords in major search engines. Additionally, newly released packages and capabilities are often highlighted in Laravel’s official newsletter.

Laravel code snippet showing Eloquent cast for HTML strings with highlighted newsletter announcement section.

Laravel comes with a solid set of built-in tools, but these are considered the bare essentials. This ensures you can be productive from the start while keeping the framework lightweight. However, if you need help implementing a common feature - such as a media library - third-party packages can significantly speed up development. Unlike WordPress plugins, which are usually managed through a settings panel, Laravel packages often include their own configuration files, allowing you to fine-tune them to fit your specific needs. In many cases, you can even extend or customize certain functionality.

Do note, however, that while packages are a powerful aspect of Laravel, relying too much on third-party solutions may eventually lead to certain dependency or compatibility issues. Since these packages are designed to serve a broad audience, they may introduce unnecessary complexity, impact performance, or reduce maintainability. While it’s reassuring to delegate certain functionalities to external developers, it’s essential to treat each package as a dependency and assess its long-term impact on your project. So, if it’s not too much work building a specific feature yourself, avoiding prematurely resorting to packages may be of long-term benefit to your project.

Multiple hosting options

Hosting your own applications can be liberating; you’re paying your hosting provider(s), rather than relying on cloud platforms. While it does require some maintenance on your part, it can be a highly cost-efficient solution - especially if you plan to monetize your web app. With Laravel’s options ranging from simple to more advanced hosting solutions, you're likely to find one that suits your needs.

There are three main ways to launch and manage your app with Laravel. The first is handling everything manually, which involves logging into your server via SSH and configuring everything yourself. However, this can quickly become overwhelming, even for those with server management experience. 

A more accessible approach is using Laravel Forge, including its pricing. The key advantage of Forge is that it  acts as a graphical interface (GUI) for executing server commands, simplifying the app launch and management process significantly. Beyond server management, it also allows you to create new servers effortlessly. Once your server is set up, you can host an unlimited number of sites. Chances are, however, you’ll principally rely on this service during the burgeoning stages of production, only to rarely revisit it later on (while continuing to pay for access). 

Laravel Forge dashboard showing multiple connected servers with details like PHP and MySQL versions.

If you’d rather avoid managing multiple services and selecting the right server type, Laravel now offers its own official hosting solution: Laravel Cloud. This service acts as an abstraction layer on top of Forge, allowing you to deploy apps without dealing with the underlying infrastructure. It’s designed to make launching and scaling applications even easier. While this approach removes the need for server management knowledge, it also means you have less control over the hosting environment. That said, it can be a far more productive - and even enjoyable - experience to focus purely on developing rather than configuring.

Laravel Cloud dashboard showing Beep production environment with network, app, queue worker, and database.

So, which of these options would suit your needs best? If you prefer full control over your server environment, Laravel Forge might be a better choice than Laravel Cloud. However, if you're just starting out, Laravel Cloud could be the more convenient option. Alternatively, for those who genuinely enjoy working directly with servers - tweaking PHP settings, managing databases, and customizing configurations - a custom Virtual Private Server (VPS) may be the best long-term solution. With a VPS, you’re not limited by the features or restrictions of Forge or Cloud, giving you complete flexibility and freedom when installing software or making system-level adjustments. It can also be cheaper - depending on the time needed for setup and maintenance.

Pricing

Since Laravel is open-source and licensed under MIT, you can use it for almost anything, free of charge. While some premium packages are available for purchase, most essential features are included at no cost. Laravel generates most of its revenue through its server management and hosting services, but you’re not obliged to use them; you can host your applications in any environment you prefer.

That said, a paid service like Laravel Forge becomes particularly valuable when you need to deploy applications, especially if managing a server manually isn’t your strong suit. Pricing is quite affordable, starting at $12 per month or $120 per year. However, keep in mind that you’ll also need to pay for your actual server, with costs starting at around $5 per month for basic options, and increasing depending on your requirements.

If you prefer an all-in-one solution, Laravel Cloud might be the better choice, starting at $20 per month. There’s a free tier to help you get started, though it’s mostly intended for experimentation. Laravel Cloud can be a compelling option when you consider the time and cost involved in setting up a server through Forge or a custom VPS. Additionally, since the infrastructure scales automatically, you won’t have to worry about upgrading your server as your application grows. 

Who is Laravel best for?

Laravel can be especially attractive for experienced developers and engineering teams looking for tailored, purpose-built solutions that are thoroughly testable. The framework supports a wide array of applications, including enterprise-grade systems. That said, due to its versatility and broad target audience, it’s important to keep in mind that in order to maximally profit from Laravel, it remains essential to pair its built-in capabilities with implementation of specific business logic.

Furthermore, Laravel’s level of flexibility comes with a learning curve. Beyond Laravel itself, you’ll need a solid grasp of PHP, HTML, CSS, and JavaScript, as well as a robust understanding of Laravel-specific conventions and configurations. While Laravel is designed with developer experience in mind - offering an intuitive and well-structured framework - it still requires significant effort before you can confidently build and scale applications.

As such, you may find yourself faced with a trade-off between flexibility and the up-front investment of time and effort. For those willing to invest, the payoff is an effective system built around standards and conventions to offer scalability and maintainability in the long run.

What use cases is Laravel best for?

Laravel shines when building highly customized web applications that bring your exact vision to life. It gives you the freedom to create ‘the next big thing’ while still steadying you with a bit of a guardrail. Once you’ve built up confidence, you can create virtually anything - from a SaaS platform to a custom tool, corporate website, or media application. Again, Laravel can also serve as the backend for your API, allowing you to connect any front-end you prefer.

Packages like Laravel Nova and Filament PHP simplify the process of building dashboards and standard CRUD interfaces. However, they aren't tailored specifically for internal tools - or any single use case, for that matter. This makes them highly flexible, but it also means they lack many commonly expected features out of the box. This unopinionated design offers the freedom to implement according to specific requirements.

While Laravel was originally designed for web development, a tool called NativePHP recently made it possible to convert Laravel apps for Windows, macOS, and Linux. A new version is also in the works to support iOS and Android, allowing you to develop your application once and deploy it across multiple operating systems. If cross-platform compatibility is a priority, this could prove to be a very compelling argument for using Laravel.

What use cases is Laravel not so good for?

As we’ve mentioned, Laravel truly excels when building custom applications. However, not every project requires this level of flexibility. For example, internal tools often don’t need the same degree of customization, making Laravel feel like overkill in some cases. In other words, this level of investment may not be justified for relatively simple needs - especially at the outset. That said, once you’ve built something custom, it can be reused endlessly and refined over time.

Since Laravel is designed to serve a broad audience, it can’t cater perfectly to every use case. As a result, internal apps are often built using third-party packages, such as Filament, which provides ready-to-use grids and forms. However, while tools like Filament are certainly powerful, it isn’t specifically designed for corporate internal software—it’s a general-purpose solution. This can be both an advantage and a drawback, as it lacks the streamlined experience of dedicated internal tool platforms like Retool.

Similarly, if you just need to build a quick prototype without worrying about aesthetics, clean code or even  PHP, Laravel might introduce unnecessary complexity. Unlike low-code platforms, it doesn’t offer a drag-and-drop interface. While you can certainly copy and paste your way to a working prototype, Laravel still requires a solid understanding of its specific structure and methodology; you’ve got to learn its language. This can slow you down when you simply want to test or showcase an idea. Overthinking the setup process or getting stuck on installation or maintenance issues can kill momentum, making Laravel less ideal for rapid prototyping

That said, if you're set on creating a visually appealing prototype, it's worth exploring Tailwind UI -  a CSS/HTML library that provides ready-to-use components for apps, marketing, and e-commerce.

Comparisons to competitors

Retool

Laravel is incredibly powerful and, due to its open-source nature, also cost-effective in the long run. However, it does require a significant investment of time and energy.  If you just need to quickly build something that gets the job done, a developer tool like Retool might be a better choice.

The key benefit of Retool compared to Laravel is that everything is integrated into a single workspace, which is more visually aligned with a specific workflow and requires less abstract thinking. Rather than worrying about where to write and store your queries or the most semantic markup for your components, Retool handles that for you. 

Another key differentiator is the ability in Retool to easily mix variables with components and queries, which shortens the overall app lifecycle and makes it quicker to manage. You also don’t need to worry too much about thoroughly testing your app - at least not the ‘usual suspects’.

Nonetheless, there may come a point where your low-code or no-code application grows, and you’ll want to abstract things into high-level components or modules for reuse. While tools like Retool can accommodate this, they’re fairly limited in terms of customization and performance. On the other hand, the abstract nature of Laravel becomes a real advantage when adhering to the Don’t Repeat Yourself (DRY) principle. Over time, this subtle difference will affect your app’s scalability potential. But also your developer experience, which is arguably the most important factor to consider in the long run.

Conclusion

Laravel has the potential to bring your app idea to life, no matter what that idea may be. While it does have a bit of a learning curve, its strength lies in its flexibility, enabled by the fact that it involves multiple programming languages. This can be an advantage, as you're not confined to the constraints of a single solution. Instead, you’re working with standardized languages like HTML, CSS, and JavaScript - skills that are transferable to other projects, even those that don’t involve Laravel. These versatile (and free) tools create a strong, flexible workflow.

Laravel can be a rewarding challenge to take on. With so many tools available, including hosting services, there’s never been a better time to explore Laravel and its potential. If you get stuck, the Laravel community is full of people willing to help, and you can always turn to your preferred AI tool for assistance - both of which can help you better understand what’s possible.

Nevertheless, if you’re looking for a tool with an easier learning curve, and more functionality available out of the box, a tool like Retool may be a faster and simpler option. If you are looking for powerful scripting above all, check out a tool like Windmill. We also have plenty of articles about no/low-code tools, which can be useful in many business software use cases, and much easier to learn for non-technical folk. Check out our Tools page to learn more about the platforms available for building better internal tools. 

💡
At Bold Tech, we specialize in building great internal tools, fast, using developer tools like Retool. We are obsessed with building apps that make your teams happier and more productive. In our blog, you can learn all about how to build better business software for more satisfied employees, or get in contact to chat to us about what you're looking to build.

Want to learn more about internal tools and how to build them? Check out our sections on low-code tools like Notion and Airtable, or developer tools like Retool and Windmill.

About the author
Tools Team

Tools Team

The tools.dev team comprises internal tools specialists with deep expertise in the platforms used to develop and optimize these solutions.

Your hub for internal tools.

Powered by Bold Tech, internal tool experts.

Sign up for updates
tools.dev

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to tools.dev.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.