{"id":4536,"date":"2022-03-02T11:00:31","date_gmt":"2022-03-02T11:00:31","guid":{"rendered":"https:\/\/www.liainfraservices.com\/blog\/?p=4536"},"modified":"2022-04-06T06:17:49","modified_gmt":"2022-04-06T06:17:49","slug":"9-steps-to-connect-a-database-to-laravel","status":"publish","type":"post","link":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/","title":{"rendered":"9 Steps to Connect Database to Laravel"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><\/span> <span class=\"rt-time\"> 3<\/span> <span class=\"rt-label rt-postfix\">min read<\/span><\/span><div class='epvc-post-count'><span class='epvc-eye'><\/span>  <span class=\"epvc-count\"> 5,526<\/span><\/div>\n<p class=\"wp-block-paragraph\">The database is an important element in any application. Let&#8217;s look in to the 9 Steps to Connect a Database to Larvel by the No.1 <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"><a href=\"https:\/\/www.liainfraservices.com\/mobile-app-development-company-in-chennai\" target=\"_blank\" rel=\"noreferrer noopener\">Mobile App Development Company in Chennai<\/a><\/mark>. In general Laravel by default provides the support of MySQL. Where as the MySQL is a well-known, open-source <strong>RDBMS (Relational Database Management System)<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Here are the 9 steps to connect your (MySql) Database to Laravel:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Process for Connecting to the Database:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Step 1:<\/strong> First we have to create a database. So, we will start <strong>Apache<\/strong> and <strong>MySQL<\/strong> servers from <strong>XAMPP Control Panel<\/strong>.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/aDYrcxve4ADkXuSrH70UMcYp5LjET-Q8EKOGzHt4ktoYxSaHsIWsR31BRJ77ttHVkNvsYy-9flmd3tWrQxuaPGvYJZnNwtSSXy6hyvQdkgH2yWy_tiHZJYys7Uuci8JW-PbmP3qh\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Step 2:<\/strong> Open any web browser, like Chrome, and type <strong>localhost\/phpmyadmin<\/strong> in URL.<\/li><li><strong>Step 3:<\/strong> Now, click on the <strong>Databases<\/strong> tab and there, write the database named as <strong>sample <\/strong>and click on create.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/5BwVJRe-lhx7wlQZBp1t1tbmXdCDq7Hf_Sjbxul8Rhk8vauS7UxQYfJMA_GqqqebzyeS4eOuWmv-2YE7CXfuPOrpKnpcBFFWAM90Lzij_wOirG71cMgQ0sq7HpxwQquKW7JpECyO\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Step 4:<\/strong> Now, you will have to find a file named <strong>.env<\/strong>, where you will have to specify the details for the <strong>MySQL<\/strong> server, like database name, username, etc. In that file, you will have to search for names starting with <strong>DB_<\/strong>.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/w4KOrN8MUEoZfiGsjfPqKcTMQXn0odzkAvrTFLcLCy2PQGSEox8WQT7OSHbMfWnUht3poK2Oe6_OTxtcPxI0IoVz1L9EkCGiDskiXnmH7HBjDqqyArTyJY4F2IVIyDt9q6bFNsSy\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Step 5:<\/strong> In that, you will find the <strong>DB_CONNECTION=mysql<\/strong> line. Below this are all the details specified for the database connection. You will have to specify the database name <strong>sample<\/strong>, that we created, after <strong>DB_DATABASE=<\/strong> and also specify username and password according to your need. Then save the file.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/FO89YYVfMrkGElOmqjGrvcSuljLPUmXC05NmG4NQ1jNNlubSF0nDyUnWGaaCozmAYaztDcdjGc5Uhvo_4wf8rcIn_GwuqUY8OcqImi-InK1TS33dSMiuMAP1mfWwDVT_UsxL5L3h\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Step 6:<\/strong> Now, we will create a View in <strong>resources\/views<\/strong> directory with the name <strong>demo.blade.php<\/strong>. Write the below code in the file.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;!DOCTYPE html&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;html&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;head&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;title&gt;Demo Sample&lt;\/title&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;style&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">div {<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">font-size: 22px;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;\/style&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;\/head&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;body&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;div&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;?php<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">if(DB::connection()-&gt;getPdo())<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">{<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">echo &#8220;Successfully connected to the database =&gt; &#8220;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">.DB::connection()-&gt;getDatabaseName();<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">?&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;\/div&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;\/body&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;\/html&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 7:<\/strong> Write the following route in the \u2018<strong>web.php<\/strong>\u2019 file in \u2018<strong>routes<\/strong>\u2019 directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Route::get(&#8216;blade&#8217;, function () {<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;return view(\u2018demo\u2019);<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">});<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 8:<\/strong> Now, run the following Laravel artisan command to start the server:<br>php artisan serve<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 9:<\/strong> And now, open the provided URL by the artisan in the browser with <strong>\/blade<\/strong> at the end.<br><a href=\"http:\/\/127.0.0.1:8000\/blade\">http:\/\/127.0.0.1:8000\/blade<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/d7u3sMRRgsVrQGUk7nCmynkM8ZnXtwOV2dabPjVurElb3YqiwjSebO0Z6YODtuC0KEC8C-F-00-RxPTczafl8fF4kpgWIMSe5hd-xPHU29DDnDgP7XAotLaQmZ378YGBWycSVCn4\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Connecting to databases and running queries is a breeze with Laravel. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">app\/config\/database.php is the database configuration file. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Well, you can define all of your database connections in this file, as well as which one should be utilised by default. Hope you like the 9 using the Steps to Connect a Database to Laravel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For more details <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\"><a href=\"https:\/\/www.liainfraservices.com\/contact\" target=\"_blank\" rel=\"noreferrer noopener\">contact Lia Infaraservices<\/a><\/mark>.<\/p>\n\n\n<div class=\"taxonomy-post_tag wp-block-post-terms has-medium-font-size\"><a href=\"https:\/\/www.liainfraservices.com\/blog\/tag\/android-app-development-company-in-chennai\/\" rel=\"tag\">android app development company in chennai<\/a><span class=\"wp-block-post-terms__separator\">|<\/span><a href=\"https:\/\/www.liainfraservices.com\/blog\/tag\/cloud-migration-services\/\" rel=\"tag\">Cloud Migration Services<\/a><span class=\"wp-block-post-terms__separator\">|<\/span><a href=\"https:\/\/www.liainfraservices.com\/blog\/tag\/database-migration-services\/\" rel=\"tag\">Database Migration Services<\/a><span class=\"wp-block-post-terms__separator\">|<\/span><a href=\"https:\/\/www.liainfraservices.com\/blog\/tag\/digital-marketing\/\" rel=\"tag\">Digital Marketing<\/a><span class=\"wp-block-post-terms__separator\">|<\/span><a href=\"https:\/\/www.liainfraservices.com\/blog\/tag\/ios-app-development-company-in-chennai\/\" rel=\"tag\">ios app development company in chennai<\/a><span class=\"wp-block-post-terms__separator\">|<\/span><a href=\"https:\/\/www.liainfraservices.com\/blog\/tag\/laravel-framework\/\" rel=\"tag\">Laravel Framework<\/a><span class=\"wp-block-post-terms__separator\">|<\/span><a href=\"https:\/\/www.liainfraservices.com\/blog\/tag\/mobile-app-development-company-in-chennai\/\" rel=\"tag\">mobile app development company in chennai<\/a><span class=\"wp-block-post-terms__separator\">|<\/span><a href=\"https:\/\/www.liainfraservices.com\/blog\/tag\/mobile-application-development-company\/\" rel=\"tag\">Mobile Application Development Company<\/a><span class=\"wp-block-post-terms__separator\">|<\/span><a href=\"https:\/\/www.liainfraservices.com\/blog\/tag\/web-application-development\/\" rel=\"tag\">Web Application Development<\/a><span class=\"wp-block-post-terms__separator\">|<\/span><a href=\"https:\/\/www.liainfraservices.com\/blog\/tag\/website-design-development\/\" rel=\"tag\">website design &amp; development<\/a><\/div>","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><\/span> <span class=\"rt-time\"> 3<\/span> <span class=\"rt-label rt-postfix\">min read<\/span><\/span>5,526 The database is an important element in any application. Let&#8217;s look in to the 9 Steps to Connect a Database to Larvel by the No.1 Mobile App Development Company<\/p>\n","protected":false},"author":1,"featured_media":4537,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"footnotes":""},"categories":[698],"tags":[886,336,374,30,887,850,826,690,210,27],"class_list":["post-4536","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mobile-application-development","tag-android-app-development-company-in-chennai","tag-cloud-migration-services","tag-database-migration-services","tag-digital-marketing","tag-ios-app-development-company-in-chennai","tag-laravel-framework","tag-mobile-app-development-company-in-chennai","tag-mobile-application-development-company","tag-web-application-development","tag-website-design-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>9 Steps to Connect Database to Laravel - Blog | Liainfraservices<\/title>\n<meta name=\"description\" content=\"Check out the 9 steps to connect Database to Larvel by Lia Infraservices - The Best Mobile App Development Company in India.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"9 Steps to Connect Database to Laravel - Blog | Liainfraservices\" \/>\n<meta property=\"og:description\" content=\"Check out the 9 steps to connect Database to Larvel by Lia Infraservices - The Best Mobile App Development Company in India.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog | Liainfraservices\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-02T11:00:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-06T06:17:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.liainfraservices.com\/blog\/wp-content\/uploads\/2022\/03\/9-Steps-to-Connect-a-Database-to-Laravel..jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t<meta property=\"og:image:height\" content=\"315\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Partho\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Partho\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/\"},\"author\":{\"name\":\"Partho\",\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/#\\\/schema\\\/person\\\/b5a729cb152dd3bc7f07550ca9d223e4\"},\"headline\":\"9 Steps to Connect Database to Laravel\",\"datePublished\":\"2022-03-02T11:00:31+00:00\",\"dateModified\":\"2022-04-06T06:17:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/\"},\"wordCount\":431,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/9-Steps-to-Connect-a-Database-to-Laravel..jpg\",\"keywords\":[\"android app development company in chennai\",\"Cloud Migration Services\",\"Database Migration Services\",\"Digital Marketing\",\"ios app development company in chennai\",\"Laravel Framework\",\"mobile app development company in chennai\",\"Mobile Application Development Company\",\"Web Application Development\",\"website design &amp; development\"],\"articleSection\":[\"Mobile Application Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/\",\"url\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/\",\"name\":\"9 Steps to Connect Database to Laravel - Blog | Liainfraservices\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/9-Steps-to-Connect-a-Database-to-Laravel..jpg\",\"datePublished\":\"2022-03-02T11:00:31+00:00\",\"dateModified\":\"2022-04-06T06:17:49+00:00\",\"description\":\"Check out the 9 steps to connect Database to Larvel by Lia Infraservices - The Best Mobile App Development Company in India.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/9-Steps-to-Connect-a-Database-to-Laravel..jpg\",\"contentUrl\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/9-Steps-to-Connect-a-Database-to-Laravel..jpg\",\"width\":512,\"height\":315,\"caption\":\"9-Steps-to-Connect-a-Database-to-Laravel.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/9-steps-to-connect-a-database-to-laravel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mobile Application Development\",\"item\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/category\\\/mobile-application-development\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"9 Steps to Connect Database to Laravel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/\",\"name\":\"Blog | Liainfraservices\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/#organization\",\"name\":\"Blog | Liainfraservices\",\"url\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/lia-logo-b-e1635340384244.png\",\"contentUrl\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/lia-logo-b-e1635340384244.png\",\"width\":308,\"height\":96,\"caption\":\"Blog | Liainfraservices\"},\"image\":{\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.liainfraservices.com\\\/blog\\\/#\\\/schema\\\/person\\\/b5a729cb152dd3bc7f07550ca9d223e4\",\"name\":\"Partho\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6c5fc8918cc5dbc844eccbeaaf854eef27d2c79ab17ff0022304f712805d6959?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6c5fc8918cc5dbc844eccbeaaf854eef27d2c79ab17ff0022304f712805d6959?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6c5fc8918cc5dbc844eccbeaaf854eef27d2c79ab17ff0022304f712805d6959?s=96&d=mm&r=g\",\"caption\":\"Partho\"},\"description\":\"Partho Das, founder of Lia Infraservices, has 15+ years of expertise in cloud solutions, DevOps, and infrastructure security. He provides consultation on architecture planning, DevOps setup, Kubernetes, and cloud migrations. Partho holds multiple AWS and Azure certifications, along with CISCO CCNA &amp; CCNP. Connect on LinkedIn\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/partho-dev\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"9 Steps to Connect Database to Laravel - Blog | Liainfraservices","description":"Check out the 9 steps to connect Database to Larvel by Lia Infraservices - The Best Mobile App Development Company in India.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/","og_locale":"en_US","og_type":"article","og_title":"9 Steps to Connect Database to Laravel - Blog | Liainfraservices","og_description":"Check out the 9 steps to connect Database to Larvel by Lia Infraservices - The Best Mobile App Development Company in India.","og_url":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/","og_site_name":"Blog | Liainfraservices","article_published_time":"2022-03-02T11:00:31+00:00","article_modified_time":"2022-04-06T06:17:49+00:00","og_image":[{"width":512,"height":315,"url":"https:\/\/www.liainfraservices.com\/blog\/wp-content\/uploads\/2022\/03\/9-Steps-to-Connect-a-Database-to-Laravel..jpg","type":"image\/jpeg"}],"author":"Partho","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Partho","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/#article","isPartOf":{"@id":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/"},"author":{"name":"Partho","@id":"https:\/\/www.liainfraservices.com\/blog\/#\/schema\/person\/b5a729cb152dd3bc7f07550ca9d223e4"},"headline":"9 Steps to Connect Database to Laravel","datePublished":"2022-03-02T11:00:31+00:00","dateModified":"2022-04-06T06:17:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/"},"wordCount":431,"commentCount":0,"publisher":{"@id":"https:\/\/www.liainfraservices.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/#primaryimage"},"thumbnailUrl":"https:\/\/www.liainfraservices.com\/blog\/wp-content\/uploads\/2022\/03\/9-Steps-to-Connect-a-Database-to-Laravel..jpg","keywords":["android app development company in chennai","Cloud Migration Services","Database Migration Services","Digital Marketing","ios app development company in chennai","Laravel Framework","mobile app development company in chennai","Mobile Application Development Company","Web Application Development","website design &amp; development"],"articleSection":["Mobile Application Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/","url":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/","name":"9 Steps to Connect Database to Laravel - Blog | Liainfraservices","isPartOf":{"@id":"https:\/\/www.liainfraservices.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/#primaryimage"},"image":{"@id":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/#primaryimage"},"thumbnailUrl":"https:\/\/www.liainfraservices.com\/blog\/wp-content\/uploads\/2022\/03\/9-Steps-to-Connect-a-Database-to-Laravel..jpg","datePublished":"2022-03-02T11:00:31+00:00","dateModified":"2022-04-06T06:17:49+00:00","description":"Check out the 9 steps to connect Database to Larvel by Lia Infraservices - The Best Mobile App Development Company in India.","breadcrumb":{"@id":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/#primaryimage","url":"https:\/\/www.liainfraservices.com\/blog\/wp-content\/uploads\/2022\/03\/9-Steps-to-Connect-a-Database-to-Laravel..jpg","contentUrl":"https:\/\/www.liainfraservices.com\/blog\/wp-content\/uploads\/2022\/03\/9-Steps-to-Connect-a-Database-to-Laravel..jpg","width":512,"height":315,"caption":"9-Steps-to-Connect-a-Database-to-Laravel."},{"@type":"BreadcrumbList","@id":"https:\/\/www.liainfraservices.com\/blog\/9-steps-to-connect-a-database-to-laravel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.liainfraservices.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Mobile Application Development","item":"https:\/\/www.liainfraservices.com\/blog\/category\/mobile-application-development\/"},{"@type":"ListItem","position":3,"name":"9 Steps to Connect Database to Laravel"}]},{"@type":"WebSite","@id":"https:\/\/www.liainfraservices.com\/blog\/#website","url":"https:\/\/www.liainfraservices.com\/blog\/","name":"Blog | Liainfraservices","description":"","publisher":{"@id":"https:\/\/www.liainfraservices.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.liainfraservices.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.liainfraservices.com\/blog\/#organization","name":"Blog | Liainfraservices","url":"https:\/\/www.liainfraservices.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.liainfraservices.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.liainfraservices.com\/blog\/wp-content\/uploads\/2021\/10\/lia-logo-b-e1635340384244.png","contentUrl":"https:\/\/www.liainfraservices.com\/blog\/wp-content\/uploads\/2021\/10\/lia-logo-b-e1635340384244.png","width":308,"height":96,"caption":"Blog | Liainfraservices"},"image":{"@id":"https:\/\/www.liainfraservices.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.liainfraservices.com\/blog\/#\/schema\/person\/b5a729cb152dd3bc7f07550ca9d223e4","name":"Partho","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/6c5fc8918cc5dbc844eccbeaaf854eef27d2c79ab17ff0022304f712805d6959?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6c5fc8918cc5dbc844eccbeaaf854eef27d2c79ab17ff0022304f712805d6959?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6c5fc8918cc5dbc844eccbeaaf854eef27d2c79ab17ff0022304f712805d6959?s=96&d=mm&r=g","caption":"Partho"},"description":"Partho Das, founder of Lia Infraservices, has 15+ years of expertise in cloud solutions, DevOps, and infrastructure security. He provides consultation on architecture planning, DevOps setup, Kubernetes, and cloud migrations. Partho holds multiple AWS and Azure certifications, along with CISCO CCNA &amp; CCNP. Connect on LinkedIn","sameAs":["https:\/\/www.linkedin.com\/in\/partho-dev\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.liainfraservices.com\/blog\/wp-json\/wp\/v2\/posts\/4536","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.liainfraservices.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.liainfraservices.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.liainfraservices.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.liainfraservices.com\/blog\/wp-json\/wp\/v2\/comments?post=4536"}],"version-history":[{"count":5,"href":"https:\/\/www.liainfraservices.com\/blog\/wp-json\/wp\/v2\/posts\/4536\/revisions"}],"predecessor-version":[{"id":4705,"href":"https:\/\/www.liainfraservices.com\/blog\/wp-json\/wp\/v2\/posts\/4536\/revisions\/4705"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.liainfraservices.com\/blog\/wp-json\/wp\/v2\/media\/4537"}],"wp:attachment":[{"href":"https:\/\/www.liainfraservices.com\/blog\/wp-json\/wp\/v2\/media?parent=4536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.liainfraservices.com\/blog\/wp-json\/wp\/v2\/categories?post=4536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.liainfraservices.com\/blog\/wp-json\/wp\/v2\/tags?post=4536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}