From f9436feb1832e9c51b02efaa1762c9933b821043 Mon Sep 17 00:00:00 2001 From: Aji Kamaludin Date: Sat, 18 Dec 2021 22:44:50 +0700 Subject: [PATCH] modify --- .env.example | 2 +- .htaccess | 5 +++++ index.php | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .htaccess create mode 100644 index.php diff --git a/.env.example b/.env.example index fbb3f79..c5fb367 100644 --- a/.env.example +++ b/.env.example @@ -8,7 +8,7 @@ LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug -DB_CONNECTION=mysql +DB_CONNECTION=sqlite DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=expense_tracker diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..0a16efe --- /dev/null +++ b/.htaccess @@ -0,0 +1,5 @@ + + RewriteEngine On + RewriteCond %{REQUEST_URI} !^public/ + RewriteRule ^(.*)$ public/$1 [L] #relative substitution + diff --git a/index.php b/index.php new file mode 100644 index 0000000..5fb6379 --- /dev/null +++ b/index.php @@ -0,0 +1,21 @@ + + */ + +$uri = urldecode( + parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) +); + +// This file allows us to emulate Apache's "mod_rewrite" functionality from the +// built-in PHP web server. This provides a convenient way to test a Laravel +// application without having installed a "real" web server software here. +if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { + return false; +} + +require_once __DIR__.'/public/index.php';