File tree Expand file tree Collapse file tree 9 files changed +17
-29
lines changed Expand file tree Collapse file tree 9 files changed +17
-29
lines changed Original file line number Diff line number Diff line change @@ -4,26 +4,17 @@ ENVIRONMENT="dev"
4
4
# The secure key Craft will use for hashing and encrypting data
5
5
SECURITY_KEY = " "
6
6
7
- # The database driver that will be used ('mysql' or 'pgsql')
8
- DB_DRIVER = " mysql"
9
-
10
- # The database server name or IP address (usually this is 'localhost' or '127.0.0.1')
11
- DB_SERVER = " localhost"
7
+ # The Data Source Name (“DSN”) that tells Craft how to connect to the database
8
+ DB_DSN = " "
12
9
13
10
# The database username to connect with
14
11
DB_USER = " root"
15
12
16
13
# The database password to connect with
17
14
DB_PASSWORD = " "
18
15
19
- # The name of the database to select
20
- DB_DATABASE = " "
21
-
22
16
# The database schema that will be used (PostgreSQL only)
23
17
DB_SCHEMA = " public"
24
18
25
19
# The prefix that should be added to generated table names (only necessary if multiple things are sharing the same database)
26
20
DB_TABLE_PREFIX = " "
27
-
28
- # The port to connect to the database with. Will default to 5432 for PostgreSQL and 3306 for MySQL.
29
- DB_PORT = " "
Original file line number Diff line number Diff line change 20
20
"issues" : " https://github.com/chasegiunta/craft-vue-tailwind/issues"
21
21
},
22
22
"require" : {
23
- "craftcms/cms" : " ^3.0 .0" ,
24
- "vlucas/phpdotenv" : " ^2 .4.0" ,
23
+ "craftcms/cms" : " ^3.4 .0" ,
24
+ "vlucas/phpdotenv" : " ^3 .4.0" ,
25
25
"nystudio107/craft-twigpack" : " ^1.1"
26
26
},
27
27
"autoload" : {
Original file line number Diff line number Diff line change 1
1
{
2
2
"require": {
3
- "craftcms/cms": "^3.0 .0",
4
- "vlucas/phpdotenv": "^2 .4.0"
3
+ "craftcms/cms": "^3.4 .0",
4
+ "vlucas/phpdotenv": "^3 .4.0"
5
5
},
6
6
"autoload": {
7
7
"psr-4": {
Original file line number Diff line number Diff line change 9
9
*/
10
10
11
11
return [
12
- 'driver ' => getenv ('DB_DRIVER ' ),
13
- 'server ' => getenv ('DB_SERVER ' ),
12
+ 'dsn ' => getenv ('DB_DSN ' ),
14
13
'user ' => getenv ('DB_USER ' ),
15
14
'password ' => getenv ('DB_PASSWORD ' ),
16
- 'database ' => getenv ('DB_DATABASE ' ),
17
15
'schema ' => getenv ('DB_SCHEMA ' ),
18
16
'tablePrefix ' => getenv ('DB_TABLE_PREFIX ' ),
19
- 'port ' => getenv ('DB_PORT ' )
20
17
];
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ require_once CRAFT_VENDOR_PATH.'/autoload.php';
13
13
14
14
// Load dotenv?
15
15
if (class_exists ('Dotenv\Dotenv ' ) && file_exists (CRAFT_BASE_PATH .'/.env ' )) {
16
- ( new Dotenv \Dotenv (CRAFT_BASE_PATH ) )->load ();
16
+ Dotenv \Dotenv:: create (CRAFT_BASE_PATH )->load ();
17
17
}
18
18
19
19
// Load and run Craft
Original file line number Diff line number Diff line change 13
13
"vue" : " ^2.6.0"
14
14
},
15
15
"devDependencies" : {
16
- "@vue/cli-plugin-babel" : " ^3.8 .0" ,
17
- "@vue/cli-service" : " ^3.8 .0" ,
16
+ "@vue/cli-plugin-babel" : " ^4.0 .0" ,
17
+ "@vue/cli-service" : " ^4.0 .0" ,
18
18
"filemanager-webpack-plugin" : " ^2.0.5" ,
19
19
"glob-all" : " ^3.1.0" ,
20
20
"purgecss-webpack-plugin" : " ^1.5.0" ,
21
21
"purgecss-whitelister" : " ^2.1.0" ,
22
22
"vue-template-compiler" : " ^2.6.0" ,
23
- "webpack-manifest-plugin" : " ^2.0 .4"
23
+ "webpack-manifest-plugin" : " ^2.1 .4"
24
24
},
25
25
"postcss" : {
26
26
"plugins" : {
Original file line number Diff line number Diff line change 23
23
<span class =" text-green-400" >{{ info.environment }}</span > (passed in as
24
24
prop)<br />
25
25
26
- <span class =" text-white" >DB Name : </span >
26
+ <span class =" text-white" >DSN Settings : </span >
27
27
<span class =" text-green-400" ><slot ></slot ></span > (passed in through
28
28
slot)
29
29
</code >
@@ -37,9 +37,9 @@ export default {
37
37
props: [" info" ],
38
38
data () {
39
39
return {
40
- msg: " Hello World"
40
+ msg: " Hello World" ,
41
41
};
42
- }
42
+ },
43
43
};
44
44
</script >
45
45
52
52
h2 {
53
53
font-weight : normal ;
54
54
}
55
- </style >
55
+ </style >
Original file line number Diff line number Diff line change 18
18
} %}
19
19
20
20
<hello -world :info =" {{ info | json_encode }}" >
21
- {{ getenv(' DB_DATABASE ' ) }}
21
+ {{ getenv(' DB_DSN ' ) }}
22
22
</hello -world >
23
23
</div >
24
24
Original file line number Diff line number Diff line change 12
12
13
13
// Load dotenv?
14
14
if (class_exists ('Dotenv\Dotenv ' ) && file_exists (CRAFT_BASE_PATH .'/.env ' )) {
15
- ( new Dotenv \Dotenv (CRAFT_BASE_PATH ) )->load ();
15
+ Dotenv \Dotenv:: create (CRAFT_BASE_PATH )->load ();
16
16
}
17
17
18
18
// Load and run Craft
You can’t perform that action at this time.
0 commit comments