{"id":52,"date":"2023-02-15T12:32:48","date_gmt":"2023-02-15T12:32:48","guid":{"rendered":"http:\/\/blog.aryapurwadana.com\/?p=52"},"modified":"2023-02-15T12:32:50","modified_gmt":"2023-02-15T12:32:50","slug":"laravel-introduction","status":"publish","type":"post","link":"https:\/\/blog.aryapurwadana.com\/index.php\/2023\/02\/15\/laravel-introduction\/","title":{"rendered":"Laravel &#8211; Introduction"},"content":{"rendered":"\n<p>Laravel is an open-source PHP framework, which is robust and easy to understand. It follows a model-view-controller design pattern. Laravel reuses the existing components of different frameworks which helps in creating a web application. The web application thus designed is more structured and pragmatic.<\/p>\n\n\n\n<p>Laravel offers a rich set of functionalities which incorporates the basic features of PHP frameworks like CodeIgniter, Yii and other programming languages like Ruby on Rails. Laravel has a very rich set of features which will boost the speed of web development.<\/p>\n\n\n\n<p>If you are familiar with Core PHP and Advanced PHP, Laravel will make your task easier. It saves a lot time if you are planning to develop a website from scratch. Moreover, a website built in Laravel is secure and prevents several web attacks.<\/p>\n\n\n\n<h2 id=\"advantages-of-laravel\" class=\"wp-block-heading\">Advantages of Laravel<\/h2>\n\n\n\n<p>Laravel offers you the following advantages, when you are designing a web application based on it \u2212<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The web application becomes more scalable, owing to the Laravel framework.<\/li>\n\n\n\n<li>Considerable time is saved in designing the web application, since Laravel reuses the components from other framework in developing web application.<\/li>\n\n\n\n<li>It includes namespaces and interfaces, thus helps to organize and manage resources.<\/li>\n<\/ul>\n\n\n\n<h3 id=\"composer\" class=\"wp-block-heading\">Composer<\/h3>\n\n\n\n<p>Composer is a tool which includes all the dependencies and libraries. It allows a user to create a project with respect to the mentioned framework (for example, those used in Laravel installation). Third party libraries can be installed easily with help of composer.<\/p>\n\n\n\n<p>All the dependencies are noted in <strong>composer.json<\/strong> file which is placed in the source folder.<\/p>\n\n\n\n<h3 id=\"artisan\" class=\"wp-block-heading\">Artisan<\/h3>\n\n\n\n<p>Command line interface used in Laravel is called <strong>Artisan<\/strong>. It includes a set of commands which assists in building a web application. These commands are incorporated from Symphony framework, resulting in add-on features in Laravel 5.1 (latest version of Laravel).<\/p>\n\n\n\n<h2 id=\"features-of-laravel\" class=\"wp-block-heading\">Features of Laravel<\/h2>\n\n\n\n<p>Laravel offers the following key features which makes it an ideal choice for designing web applications \u2212<\/p>\n\n\n\n<h3 id=\"modularity\" class=\"wp-block-heading\">Modularity<\/h3>\n\n\n\n<p>Laravel provides 20 built in libraries and modules which helps in enhancement of the application. Every module is integrated with Composer dependency manager which eases updates.<\/p>\n\n\n\n<h3 id=\"testability\" class=\"wp-block-heading\">Testability<\/h3>\n\n\n\n<p>Laravel includes features and helpers which helps in testing through various test cases. This feature helps in maintaining the code as per the requirements.<\/p>\n\n\n\n<h3 id=\"routing\" class=\"wp-block-heading\">Routing<\/h3>\n\n\n\n<p>Laravel provides a flexible approach to the user to define routes in the web application. Routing helps to scale the application in a better way and increases its performance.<\/p>\n\n\n\n<h3 id=\"configuration-management\" class=\"wp-block-heading\">Configuration Management<\/h3>\n\n\n\n<p>A web application designed in Laravel will be running on different environments, which means that there will be a constant change in its configuration. Laravel provides a consistent approach to handle the configuration in an efficient way.<\/p>\n\n\n\n<h3 id=\"query-builder-and-orm\" class=\"wp-block-heading\">Query Builder and ORM<\/h3>\n\n\n\n<p>Laravel incorporates a query builder which helps in querying databases using various simple chain methods. It provides <strong>ORM<\/strong> (Object Relational Mapper) and <strong>ActiveRecord<\/strong> implementation called Eloquent.<\/p>\n\n\n\n<h3 id=\"schema-builder\" class=\"wp-block-heading\">Schema Builder<\/h3>\n\n\n\n<p>Schema Builder maintains the database definitions and schema in PHP code. It also maintains a track of changes with respect to database migrations.<\/p>\n\n\n\n<h3 id=\"template-engine\" class=\"wp-block-heading\">Template Engine<\/h3>\n\n\n\n<p>Laravel uses the <strong>Blade Template<\/strong> engine, a lightweight template language used to design hierarchical blocks and layouts with predefined blocks that include dynamic content.<\/p>\n\n\n\n<h3 id=\"e-mail\" class=\"wp-block-heading\">E-mail<\/h3>\n\n\n\n<p>Laravel includes a <strong>mail<\/strong> class which helps in sending mail with rich content and attachments from the web application.<\/p>\n\n\n\n<h3 id=\"authentication\" class=\"wp-block-heading\">Authentication<\/h3>\n\n\n\n<p>User authentication is a common feature in web applications. Laravel eases designing authentication as it includes features such as <strong>register, forgot password<\/strong> and <strong>send password reminders<\/strong>.<\/p>\n\n\n\n<h3 id=\"redis\" class=\"wp-block-heading\">Redis<\/h3>\n\n\n\n<p>Laravel uses <strong>Redis<\/strong> to connect to an existing session and general-purpose cache. Redis interacts with session directly.<\/p>\n\n\n\n<h3 id=\"queues\" class=\"wp-block-heading\">Queues<\/h3>\n\n\n\n<p>Laravel includes queue services like emailing large number of users or a specified <strong>Cron<\/strong> job. These queues help in completing tasks in an easier manner without waiting for the previous task to be completed.<\/p>\n\n\n\n<h3 id=\"event-and-command-bus\" class=\"wp-block-heading\">Event and Command Bus<\/h3>\n\n\n\n<p>Laravel 5.1 includes <strong>Command Bus<\/strong> which helps in executing commands and dispatch events in a simple way. The commands in Laravel act as per the application\u2019s lifecycle.<\/p>\n","protected":false},"excerpt":{"rendered":"Laravel is an open-source PHP framework, which is robust and easy to understand. It follows a model-view-controller design&hellip;\n","protected":false},"author":1,"featured_media":53,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_appearance_grid":"","csco_page_load_nextpost":"","csco_post_video_location":[],"csco_post_video_location_hash":"","csco_post_video_url":"","csco_post_video_bg_start_time":0,"csco_post_video_bg_end_time":0,"footnotes":""},"categories":[4,12],"tags":[],"class_list":{"0":"post-52","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-programming","8":"category-web-framework","9":"cs-entry","10":"cs-video-wrap"},"_links":{"self":[{"href":"https:\/\/blog.aryapurwadana.com\/index.php\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.aryapurwadana.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.aryapurwadana.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.aryapurwadana.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.aryapurwadana.com\/index.php\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":1,"href":"https:\/\/blog.aryapurwadana.com\/index.php\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"predecessor-version":[{"id":54,"href":"https:\/\/blog.aryapurwadana.com\/index.php\/wp-json\/wp\/v2\/posts\/52\/revisions\/54"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.aryapurwadana.com\/index.php\/wp-json\/wp\/v2\/media\/53"}],"wp:attachment":[{"href":"https:\/\/blog.aryapurwadana.com\/index.php\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.aryapurwadana.com\/index.php\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.aryapurwadana.com\/index.php\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}