{"id":636,"date":"2024-01-27T17:32:13","date_gmt":"2024-01-27T17:32:13","guid":{"rendered":"https:\/\/www.cmsgalaxy.com\/blog\/?p=636"},"modified":"2024-01-27T17:32:14","modified_gmt":"2024-01-27T17:32:14","slug":"index-php-page-call-outside-of-the-public-folder-in-laravel-project","status":"publish","type":"post","link":"https:\/\/www.cmsgalaxy.com\/blog\/index-php-page-call-outside-of-the-public-folder-in-laravel-project\/","title":{"rendered":"index.php page call outside of the public folder in Laravel project"},"content":{"rendered":"\n<p>Step 1 . Copy index.php in public folder<\/p>\n\n\n\n<p>Step 2. paste in Laravel project folder<\/p>\n\n\n\n<p>Step 3.\u00a0 Open server.php file\u00a0 Location :-\u00a0 vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\resources\\server.php<\/p>\n\n\n\n<p>&nbsp;Edit in line no. 16<\/p>\n\n\n\n<p>This :-<\/p>\n\n\n\n<p><code>require_once $publicPath.'\/index.php';<\/code><\/p>\n\n\n\n<p>To this :-<\/p>\n\n\n\n<p><code>require_once $publicPath.'\\..\\index.php';<\/code><\/p>\n\n\n\n<p>Step 4. remove or rename index.php in public folder<\/p>\n\n\n\n<p>Step 5. open index.php file Laravel project folder<\/p>\n\n\n\n<p>Edit in line no. 34<\/p>\n\n\n\n<p>This :-<\/p>\n\n\n\n<p><code>require __DIR__.'\/..\/vendor\/autoload.php';<\/code><\/p>\n\n\n\n<p>To this :-<\/p>\n\n\n\n<p><code>require __DIR__.'\/vendor\/autoload.php';<\/code><\/p>\n\n\n\n<p><strong>AND<\/strong><\/p>\n\n\n\n<p>Edit in line no. 47<\/p>\n\n\n\n<p>This :-<\/p>\n\n\n\n<p>Before :-<\/p>\n\n\n\n<p><code>$app = require_once __DIR__.'\/..\/bootstrap\/app.php';<\/code><\/p>\n\n\n\n<p>To this :-<\/p>\n\n\n\n<p><code>$app = require_once __DIR__.'\/bootstrap\/app.php';<\/code><\/p>\n\n\n\n<p>Step 6. Now you can Run you Laravel project<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step 1 . Copy index.php in public folder Step 2. paste in Laravel project folder Step 3.\u00a0 Open server.php file\u00a0<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-636","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/comments?post=636"}],"version-history":[{"count":3,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/636\/revisions"}],"predecessor-version":[{"id":639,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/636\/revisions\/639"}],"wp:attachment":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/media?parent=636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/categories?post=636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/tags?post=636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}