Skip to content

Commit 4a35bd8

Browse files
committed
add config files and update the env.example
add config files and update the env.example
1 parent f36bca0 commit 4a35bd8

File tree

6 files changed

+408
-8
lines changed

6 files changed

+408
-8
lines changed

.env.example

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
APP_NAME=RunApp
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_DEBUG=true
5+
APP_URL=http://localhost
6+
7+
LOG_CHANNEL=stack
8+
LOG_DEPRECATIONS_CHANNEL=null
9+
LOG_LEVEL=debug
10+
11+
DB_CONNECTION=mysql
12+
DB_HOST=127.0.0.1
13+
DB_PORT=3306
14+
DB_DATABASE=RunDB
15+
DB_USERNAME=root
16+
DB_PASSWORD=
17+
18+
19+
BROADCAST_DRIVER=log
20+
CACHE_DRIVER=file
21+
FILESYSTEM_DISK=local
22+
QUEUE_CONNECTION=sync

config/app.php

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
|
1616
*/
1717

18-
'name' => env('APP_NAME', 'Laravel'),
18+
'name' => env('APP_NAME', 'Run'),
1919

2020
/*
2121
|--------------------------------------------------------------------------
@@ -159,16 +159,25 @@
159159
/*
160160
* Laravel Framework Service Providers...
161161
*/
162+
# Foundation Service Provider [Illuminate >> Contracts.Foundation,Http,Log,Support,Support,Testing,Testing,Validation]
163+
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
164+
# Filesystem Register [Illuminate >> Support]
165+
Illuminate\Filesystem\FilesystemServiceProvider::class,
166+
# Console Commands Register [Illuminate >> Contracts,Database, Support]
167+
Run\Steps\Console\Providers\ConsoleSupportServiceProvider::class,
168+
# Database Register [Illuminate >> Contracts, Database, Support]
169+
Illuminate\Database\DatabaseServiceProvider::class,
170+
# Cache Register [Illuminate >> Contracts, Support]
171+
Illuminate\Cache\CacheServiceProvider::class,
172+
# Encryption Register [Illuminate >> Contracts, Support]
173+
Illuminate\Encryption\EncryptionServiceProvider::class,
174+
175+
162176
// Illuminate\Auth\AuthServiceProvider::class,
163177
// Illuminate\Broadcasting\BroadcastServiceProvider::class,
164178
// Illuminate\Bus\BusServiceProvider::class,
165-
// Illuminate\Cache\CacheServiceProvider::class,
166-
// Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
167179
// Illuminate\Cookie\CookieServiceProvider::class,
168-
// Illuminate\Database\DatabaseServiceProvider::class,
169-
// Illuminate\Encryption\EncryptionServiceProvider::class,
170-
// Illuminate\Filesystem\FilesystemServiceProvider::class,
171-
// Illuminate\Foundation\Providers\FoundationServiceProvider::class,
180+
172181
// Illuminate\Hashing\HashServiceProvider::class,
173182
// Illuminate\Mail\MailServiceProvider::class,
174183
// Illuminate\Notifications\NotificationServiceProvider::class,
@@ -192,7 +201,7 @@
192201
App\Providers\AppServiceProvider::class,
193202
// App\Providers\AuthServiceProvider::class,
194203
// // App\Providers\BroadcastServiceProvider::class,
195-
// App\Providers\EventServiceProvider::class,
204+
App\Providers\EventServiceProvider::class,
196205
App\Providers\RouteServiceProvider::class,
197206

198207
],

config/cache.php

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?php
2+
3+
use Illuminate\Support\Str;
4+
5+
return [
6+
7+
/*
8+
|--------------------------------------------------------------------------
9+
| Default Cache Store
10+
|--------------------------------------------------------------------------
11+
|
12+
| This option controls the default cache connection that gets used while
13+
| using this caching library. This connection is used when another is
14+
| not explicitly specified when executing a given caching function.
15+
|
16+
| Supported: "apc", "array", "database", "file", "memcached", "redis"
17+
|
18+
*/
19+
20+
'default' => env('CACHE_DRIVER', 'file'),
21+
22+
/*
23+
|--------------------------------------------------------------------------
24+
| Cache Stores
25+
|--------------------------------------------------------------------------
26+
|
27+
| Here you may define all of the cache "stores" for your application as
28+
| well as their drivers. You may even define multiple stores for the
29+
| same cache driver to group types of items stored in your caches.
30+
|
31+
*/
32+
33+
'stores' => [
34+
35+
'apc' => [
36+
'driver' => 'apc',
37+
],
38+
39+
'array' => [
40+
'driver' => 'array',
41+
],
42+
43+
'database' => [
44+
'driver' => 'database',
45+
'table' => env('CACHE_DATABASE_TABLE', 'cache'),
46+
'connection' => env('CACHE_DATABASE_CONNECTION'),
47+
],
48+
49+
'file' => [
50+
'driver' => 'file',
51+
'path' => storage_path('framework/cache/data'),
52+
],
53+
54+
'memcached' => [
55+
'driver' => 'memcached',
56+
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
57+
'sasl' => [
58+
env('MEMCACHED_USERNAME'),
59+
env('MEMCACHED_PASSWORD'),
60+
],
61+
'options' => [
62+
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
63+
],
64+
'servers' => [
65+
[
66+
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
67+
'port' => env('MEMCACHED_PORT', 11211),
68+
'weight' => 100,
69+
],
70+
],
71+
],
72+
73+
'redis' => [
74+
'driver' => 'redis',
75+
'connection' => env('CACHE_REDIS_CONNECTION', 'cache'),
76+
],
77+
78+
],
79+
80+
/*
81+
|--------------------------------------------------------------------------
82+
| Cache Key Prefix
83+
|--------------------------------------------------------------------------
84+
|
85+
| When utilizing a RAM based store such as APC or Memcached, there might
86+
| be other applications utilizing the same cache. So, we'll specify a
87+
| value to get prefixed to all our keys so we can avoid collisions.
88+
|
89+
*/
90+
91+
'prefix' => env(
92+
'CACHE_PREFIX',
93+
Str::slug(env('APP_NAME', 'lumen'), '_').'_cache'
94+
),
95+
96+
];

config/database.php

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<?php
2+
3+
use Illuminate\Support\Str;
4+
5+
return [
6+
7+
/*
8+
|--------------------------------------------------------------------------
9+
| Default Database Connection Name
10+
|--------------------------------------------------------------------------
11+
|
12+
| Here you may specify which of the database connections below you wish
13+
| to use as your default connection for all database work. Of course
14+
| you may use many connections at once using the Database library.
15+
|
16+
*/
17+
18+
'default' => env('DB_CONNECTION', 'mysql'),
19+
20+
/*
21+
|--------------------------------------------------------------------------
22+
| Database Connections
23+
|--------------------------------------------------------------------------
24+
|
25+
| Here are each of the database connections setup for your application.
26+
| Of course, examples of configuring each database platform that is
27+
| supported by Laravel is shown below to make development simple.
28+
|
29+
|
30+
| All database work in Laravel is done through the PHP PDO facilities
31+
| so make sure you have the driver for your particular database of
32+
| choice installed on your machine before you begin development.
33+
|
34+
*/
35+
36+
'connections' => [
37+
38+
'sqlite' => [
39+
'driver' => 'sqlite',
40+
'url' => env('DATABASE_URL'),
41+
'database' => env('DB_DATABASE', database_path('database.sqlite')),
42+
'prefix' => '',
43+
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
44+
],
45+
46+
'mysql' => [
47+
'driver' => 'mysql',
48+
'url' => env('DATABASE_URL'),
49+
'host' => env('DB_HOST', '127.0.0.1'),
50+
'port' => env('DB_PORT', '3306'),
51+
'database' => env('DB_DATABASE', 'forge'),
52+
'username' => env('DB_USERNAME', 'forge'),
53+
'password' => env('DB_PASSWORD', ''),
54+
'unix_socket' => env('DB_SOCKET', ''),
55+
'charset' => 'utf8mb4',
56+
'collation' => 'utf8mb4_unicode_ci',
57+
'prefix' => '',
58+
'prefix_indexes' => true,
59+
'strict' => true,
60+
'engine' => null,
61+
'options' => extension_loaded('pdo_mysql') ? array_filter([
62+
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
63+
]) : [],
64+
],
65+
66+
'pgsql' => [
67+
'driver' => 'pgsql',
68+
'url' => env('DATABASE_URL'),
69+
'host' => env('DB_HOST', '127.0.0.1'),
70+
'port' => env('DB_PORT', '5432'),
71+
'database' => env('DB_DATABASE', 'forge'),
72+
'username' => env('DB_USERNAME', 'forge'),
73+
'password' => env('DB_PASSWORD', ''),
74+
'charset' => 'utf8',
75+
'prefix' => '',
76+
'prefix_indexes' => true,
77+
'search_path' => 'public',
78+
'sslmode' => 'prefer',
79+
],
80+
81+
'sqlsrv' => [
82+
'driver' => 'sqlsrv',
83+
'url' => env('DATABASE_URL'),
84+
'host' => env('DB_HOST', 'localhost'),
85+
'port' => env('DB_PORT', '1433'),
86+
'database' => env('DB_DATABASE', 'forge'),
87+
'username' => env('DB_USERNAME', 'forge'),
88+
'password' => env('DB_PASSWORD', ''),
89+
'charset' => 'utf8',
90+
'prefix' => '',
91+
'prefix_indexes' => true,
92+
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
93+
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
94+
],
95+
96+
],
97+
98+
/*
99+
|--------------------------------------------------------------------------
100+
| Migration Repository Table
101+
|--------------------------------------------------------------------------
102+
|
103+
| This table keeps track of all the migrations that have already run for
104+
| your application. Using this information, we can determine which of
105+
| the migrations on disk haven't actually been run in the database.
106+
|
107+
*/
108+
109+
'migrations' => 'migrations',
110+
111+
/*
112+
|--------------------------------------------------------------------------
113+
| Redis Databases
114+
|--------------------------------------------------------------------------
115+
|
116+
| Redis is an open source, fast, and advanced key-value store that also
117+
| provides a richer body of commands than a typical key-value system
118+
| such as APC or Memcached. Laravel makes it easy to dig right in.
119+
|
120+
*/
121+
122+
'redis' => [
123+
124+
'client' => env('REDIS_CLIENT', 'phpredis'),
125+
126+
'options' => [
127+
'cluster' => env('REDIS_CLUSTER', 'redis'),
128+
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
129+
],
130+
131+
'default' => [
132+
'url' => env('REDIS_URL'),
133+
'host' => env('REDIS_HOST', '127.0.0.1'),
134+
'username' => env('REDIS_USERNAME'),
135+
'password' => env('REDIS_PASSWORD'),
136+
'port' => env('REDIS_PORT', '6379'),
137+
'database' => env('REDIS_DB', '0'),
138+
],
139+
140+
'cache' => [
141+
'url' => env('REDIS_URL'),
142+
'host' => env('REDIS_HOST', '127.0.0.1'),
143+
'username' => env('REDIS_USERNAME'),
144+
'password' => env('REDIS_PASSWORD'),
145+
'port' => env('REDIS_PORT', '6379'),
146+
'database' => env('REDIS_CACHE_DB', '1'),
147+
],
148+
149+
],
150+
151+
];

config/db.php

Whitespace-only changes.

0 commit comments

Comments
 (0)