This post about Laravel Framework Overview discusses the – Features, fundamental concepts, and important built-in packages.
I love to build Web applications using the Laravel framework..so thought to share my learning and working experience with you.
Laravel is PHP based free, open-source web development MVC framework like CodeIgniter, Symfony. Laravel is now extensively used for building high-end web applications and web services for mobile applications. Don’t worry we will understand all aspects in detail.
What is Laravel?
Laravel is PHP based free, open-source web development MVC framework developed by Taylor Otwell and first released in July 2011. As a Web Developer, I can understand that developing an enterprise level web applications involves multiple tasks (Requirement understanding, Design, DB Schema, DB Controller layer, Presentation layer, Data seeding..). The Laravel Framework Introduction will make the basic foundation of the framework.
The latest version of Laravel is 5.7. You can use following artisan command to get the version of Laravel installation:
$php artisan --version Output - Laravel Framework version 5.2.45
You can check out complete Laravel source-code at https://github.com/laravel/laravel.
Learn Laravel Tutorials:
If you are a beginner to Laravel Framework, then we recommend you to read the following topics:
- Laravel Framework Overview
- Laravel Request Lifecycle
- Top 20 Laravel Artisan Commands
- Understanding Laravel Middleware
- Laravel Routing Tutorial
- Understanding Laravel Blade Template
- Laravel Interview Questions
- Laravel Authentication
- Laravel Validation Tutorial
Secondly, Laravel facilitates developers by saving time and complexity. This framework helps developers with the MVC framework to segregate various parts of an application – Views, Database handling, and third-party packages. Laravel provides us with a clean, robust, feature-rich framework that developers can use to build great web applications.
Can you imagine that writing a REST web service is just one line code in Laravel? Yes, you got it right.
Read our complete Laravel tutorial guide helpful and be able to build any type of web application at no cost.
Laravel lets developers focus on application business logic and manage everything at the backend. Along with this it also takes care of the security of the application. Refer this link for Laravel Official Documentation https://laravel.com/docs. So what the blah…MVC architecture is? Let’s understand MVC architecture in detail!
What is MVC (Model-View-Controller) architecture?
MVC stands for Model, View, and Controller. MVC is an architectural pattern used for developing applications having UI (User interface) component, be it a web application or Desktop application. This pattern divides an application into three main components – Models, Views, and Controllers.
An application can logically be divided into the following 3 layers:
Represents the business layer. It maintains and prepares the data based on the request from controllers. This is not exposed to users.
UI part of an application, display layer that interacts with users. This is visible to users.
An intermediate between View and Models to control input/outputs ..more specifically saying handles application requests/responses. Takes user input from Views and sends that to Models for data addition/deletion/updates, retrieve data. Sends back responses (data) to Views to update the display…
Laravel framework is the composition of these three components. Laravel is MVC…
Why Laravel? Why Laravel is the best PHP Framework?
Because Laravel helps you bring your ideas to reality with no wasted code, using modern coding standards, surrounded by a vibrant community, with an empowering an ecosystem of tools. What features make Laravel special from another PHP framework?
Laravel provides FULL-STACK web development framework to build high-end web apps. Developers prefer Laravel over to other frameworks because of the performance, features, scalability it offers. It follows the Model View Controller (MVC) which makes it more useful than PHP.
The founder of Laravel uses light related words while developing Laravel frameworks, examples – “Illuminate”, “Spark”, “Elegant”, “Artisans”.
Laravel is simple, robust, secure for developers to the rapid development of web apps. developers need not spend the time to organize, clean and beautify the code.
Laravel takes care of this.
Important Features of Laravel
Following is a list of core features of the Laravel framework that make it special from another PHP framework:
- MVC support – Model-View-Controller architecture
- Secure authentication and authorization
- Rapid Application Development
- Blade Template Engine for creating/managing views.
- Eloquent ORM (object-relational mapping)
- Query Builder
- Migrations mechanism for Databases
- Homestead – virtual machine
- Artisan language
- Unit testing
- External packages support.
- Emailing facility.
Laravel Framework Overview – Fundamental Concepts:
To start building Laravel development, Lets quickly have an overview of basic concepts of the Laravel framework. Don’t worry, we will discuss in detail too:
A Laravel route is a web request URL that accesses a particular web page of your application. Routing is a process of accepting the user requests and redirecting to associated controller functions. In simple terms, you can see the route as an entry point of specific page URL from where the request is passed to appropriate route handlers (controller functions). Defining a route is the first task of laravel web development.
Read the detailed tutorial on Laravel Routing here
‘C’ in MVC stands for Controller. A Laravel Controller acts as an agent between View and Model.
[View] <-Controller-> Model
It’s a class that defines all the route handlers to control user input, process it, interact with Models and send back responses.
#4. Blade Template Engine
Laravel comes with a powerful blade template engine to create/update and manage views. The HTML views created using Blade template can be used in other views also. Like if you have generated a common view of Left sidebar to be visible on all web pages. Blade engine allows to put it in separate file and import in all other views wherever required.
A Model is ‘M’ of MVC framework. It represents the business layer. It maintains and prepares the data based on a request from controllers. This is not exposed to users. Laravel Model is a component that interacts with DB to read/write/update user input data to/from data tables.
Migrations provide a version control system for database schemas, making it possible to associate changes in the application’s codebase and required changes in the database layout. As a result, this feature simplifies the deployment and updating of Laravel-based applications. Better to first create database migrations and then migrate schema to create resultant tables. Laravel Migrations helps developers during design-phase to design database schema designs.
#7. Eloquent ORM
Eloquent is Laravel’s ActiveRecord database object-relational mapper (ORM), which
makes it easy to relate a Post class (model) to the posts database table, and get all
records with a call like Post:: all().
#8. Artisan CLI
Laravel’s command-line interface (CLI), called Artisan, was initially introduced in Laravel 3 with a limited set of capabilities. Laravel’s later migration to a Composer-based architecture allowed Artisan to incorporate different components from the Symfony framework, resulting in the availability of additional Artisan features in Laravel
Laravel Important Packages
Laravel framework comes with ready to use bundles through Composer and Packagist:
Socialite, introduced in Laravel 5.0 as an optional package, provides simplified mechanisms for authentication with different OAuth providers, including Facebook, Twitter, Google, GitHub, and Bitbucket.
Scheduler, introduced in Laravel 5.0, is an addition to the Artisan command-line utility that allows programmatic scheduling of periodically executed tasks. Internally, Scheduler relies on the cron daemon to run a single Artisan job that, in turn, executes the configured tasks.
Cashier, introduced in Laravel 4.2, provides an interface for managing subscription billing services provided by Stripe, such as handling coupons and generating invoices.
SSH, introduced in Laravel 4.1, allows programmatic execution of CLI commands on remote servers using the Secure Shell (SSH) is an encrypted network protocol.
Apart from these, additional packages can be installed using composer updates.
Laravel Important References
- Laravel official documentation – https://laravel.com/docs
- To get the latest laravel news – https://laravel-news.com/
- Laravel open-source on GitHub – https://github.com/laravel
- Laracon – Laracon is the official Laravel conference centered around the Laravel framework
Finally, I hope you have liked this post of Laravel Framework Overview.
Please share your valuable feedback in comments, we will incorporate to improve this post.
Subscribe to our Blog @ TechCluesBlog