├── databases
├── database
│ └── kiaan.db
├── models
│ ├── Configurations.php
│ ├── Notifications.php
│ └── Users.php
├── seeds
│ └── seed_users_table.php
└── migrations
│ ├── create_configurations_table.php
│ ├── create_notifications_table.php
│ └── create_users_table.php
├── public
├── robots.txt
└── .htaccess
├── resources
├── lang
│ ├── ar
│ │ └── app.php
│ └── en
│ │ └── app.php
├── config
│ └── app.php
├── routes
│ ├── api.php
│ └── web.php
├── settings
│ ├── .env
│ ├── services.php
│ └── configuration.php
└── views
│ └── welcome.html
├── application
├── helpers
│ ├── helpers.php
│ └── helper.php
├── events
│ └── WelcomeEvent.php
├── controllers
│ └── WelcomeController.php
├── middleware
│ └── Hello_World.php
├── cli
│ └── Hello_World.php
└── validator
│ └── Hello_World.php
├── helpers.php
├── composer.json
├── README.md
├── kiaan
├── index.php
├── LICENSE
├── settings.php
└── .htaccess
/databases/database/kiaan.db:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
--------------------------------------------------------------------------------
/resources/lang/ar/app.php:
--------------------------------------------------------------------------------
1 | "مرحبا"
10 | ];
--------------------------------------------------------------------------------
/resources/lang/en/app.php:
--------------------------------------------------------------------------------
1 | "welcome"
10 | ];
--------------------------------------------------------------------------------
/resources/config/app.php:
--------------------------------------------------------------------------------
1 | "Kiaan",
10 | ];
--------------------------------------------------------------------------------
/resources/routes/api.php:
--------------------------------------------------------------------------------
1 | insert([
33 | "name" => "admin",
34 | "email" => "admin@email.com",
35 | "password" => Auth::hash("password")
36 | ]);
37 | }
38 |
39 | }
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------
2 | # Hiding Your .htaccess file
3 |
4 | order allow,deny
5 | deny from all
6 |
7 | #-------------------------------------------------
8 |
9 | #-------------------------------------------------
10 | #**
11 | # Indexes false
12 | #**
13 | Options -Indexes
14 | #-------------------------------------------------
15 |
16 | #-------------------------------------------------
17 | #**
18 | # Error
19 | #**
20 | ErrorDocument 403 "
Sorry!
You don't have permission to access this resource.!"
21 | #-------------------------------------------------
22 |
23 | #-------------------------------------------------
24 | #**
25 | # Prevent .ini and other files from being open from web browser
26 | #**
27 |
28 | Order Allow,Deny
29 | Deny from all
30 |
31 |
32 | Order Allow,Deny
33 | Deny from all
34 |
35 | #-------------------------------------------------
36 |
--------------------------------------------------------------------------------
/databases/models/Notifications.php:
--------------------------------------------------------------------------------
1 | seen){
38 | $item->seen_at = date("Y-m-d h:i:s");
39 | }
40 |
41 | return $item;
42 | }
43 |
44 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Kiaan
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/application/cli/Hello_World.php:
--------------------------------------------------------------------------------
1 | "menu_handle",
33 | "test" => "test"
34 | ];
35 | }
36 |
37 | /**
38 | * Menu handle
39 | *
40 | **/
41 | public function menu_handle()
42 | {
43 | Cli::menu(["test : test action"]);
44 | }
45 |
46 | /**
47 | * Test action
48 | *
49 | **/
50 | public function test()
51 | {
52 | return "Hello_World";
53 | }
54 |
55 | }
--------------------------------------------------------------------------------
/databases/migrations/create_configurations_table.php:
--------------------------------------------------------------------------------
1 | id()
33 | ->string('title')->notNullable()
34 | ->string('value')->notNullable()
35 | ->timestamp('created_at')->current()
36 | ->timestamp('updated_at')->current()->updateCurrent()
37 | ->submit();
38 | }
39 |
40 | /**
41 | * Rollback
42 | *
43 | **/
44 | public function rollback()
45 | {
46 | Schema::deleteTable('configurations');
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/databases/migrations/create_notifications_table.php:
--------------------------------------------------------------------------------
1 | id()
33 | ->integer('user_id')->notNullable()
34 | ->string('data')->notNullable()
35 | ->boolean('seen')->default(0)
36 | ->timestamp('seen_at')->nullable()
37 | ->timestamp('created_at')->current()
38 | ->timestamp('updated_at')->current()->updateCurrent()
39 | ->submit();
40 | }
41 |
42 | /**
43 | * Rollback
44 | *
45 | **/
46 | public function rollback()
47 | {
48 | Schema::deleteTable('notifications');
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/databases/migrations/create_users_table.php:
--------------------------------------------------------------------------------
1 | id()
33 | ->string('name')->notNullable()
34 | ->string('email')->notNullable()
35 | ->string('password')->notNullable()
36 | ->string('token')->nullable()
37 | ->string('jwt')->nullable()
38 | ->timestamp('created_at')->current()
39 | ->timestamp('updated_at')->current()->updateCurrent()
40 | ->submit();
41 | }
42 |
43 | /**
44 | * Rollback
45 | *
46 | **/
47 | public function rollback()
48 | {
49 | Schema::deleteTable('users');
50 | }
51 |
52 | }
--------------------------------------------------------------------------------
/databases/models/Users.php:
--------------------------------------------------------------------------------
1 | password = password($item->password);
48 |
49 | return $item;
50 | }
51 |
52 | /*
53 | * Phones
54 | *
55 | */
56 | public function phones()
57 | {
58 | return $this->hasOne(Phones::class);
59 | }
60 |
61 | }
--------------------------------------------------------------------------------
/resources/settings/services.php:
--------------------------------------------------------------------------------
1 | "create_users_table",
34 | "create_configurations_table" => "create_configurations_table",
35 | "create_notifications_table" => "create_notifications_table"
36 | ]);
37 |
38 | // Schema seeds
39 | Schema::seeds([
40 | "seed_users_table" => "seed_users_table",
41 | ]);
42 |
43 | // Validator rules
44 | Validator::rules([
45 | "helloWorld" => "Hello_World",
46 | ]);
47 |
48 | // Cli commands
49 | Cli::commands([
50 | "helloWorld" => "Hello_World",
51 | ]);
52 | }
53 |
54 | }
--------------------------------------------------------------------------------
/application/validator/Hello_World.php:
--------------------------------------------------------------------------------
1 | [
25 | "file" => "resources/settings/.env",
26 | ],
27 | /*--------------------------------------------------------------------------
28 | | End
29 | --------------------------------------------------------------------------*/
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Configuration
34 | |--------------------------------------------------------------------------
35 | |
36 | | Configuration of your application.
37 | |
38 | */
39 | 'configuration' => [
40 | "path" => "resources/settings/configuration"
41 | ],
42 | /*--------------------------------------------------------------------------
43 | | End
44 | --------------------------------------------------------------------------*/
45 |
46 | /*
47 | |--------------------------------------------------------------------------
48 | | Services
49 | |--------------------------------------------------------------------------
50 | |
51 | | Services of your application.
52 | |
53 | */
54 | 'services' => [
55 | "namespace" => "App\\Resources\\Settings\\Services",
56 | "method" => "handle"
57 | ],
58 | /*--------------------------------------------------------------------------
59 | | End
60 | --------------------------------------------------------------------------*/
61 |
62 | ];
63 |
--------------------------------------------------------------------------------
/.htaccess:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------
2 | #**
3 | # Enable rewrite engine
4 | #**
5 | RewriteEngine On
6 | #-------------------------------------------------
7 |
8 | #-------------------------------------------------
9 | #**
10 | # Public folder
11 | #**
12 | RewriteRule ^public/ - [L]
13 | #-------------------------------------------------
14 |
15 | #-------------------------------------------------
16 | #**
17 | # Run index.php
18 | #**
19 | RewriteCond %{REQUEST_FILENAME} -f [OR]
20 | RewriteCond %{REQUEST_FILENAME} !-f [OR]
21 | RewriteRule ^(.*)$ index.php [L,QSA]
22 |
23 | RewriteRule !index\.php$ index.php [L]
24 | #-------------------------------------------------
25 |
26 | #-------------------------------------------------
27 | #**
28 | # Indexes false
29 | #**
30 | Options -Indexes
31 | #-------------------------------------------------
32 |
33 | #-------------------------------------------------
34 | #**
35 | # Hiding Your .htaccess file
36 | #**
37 |
38 | order allow,deny
39 | deny from all
40 |
41 | #-------------------------------------------------
42 |
43 | #-------------------------------------------------
44 | #**
45 | # Error
46 | #**
47 | ErrorDocument 403 /%{REQUEST_URI}
48 | #-------------------------------------------------
49 |
50 | #-------------------------------------------------
51 | #**
52 | # Caching
53 | #**
54 |
55 | ExpiresActive on
56 | ExpiresDefault "access plus 1 month"
57 | # CSS
58 | ExpiresByType text/css "access plus 1 year"
59 | # Data interchange
60 | ExpiresByType application/json "access plus 0 seconds"
61 | ExpiresByType application/xml "access plus 0 seconds"
62 | ExpiresByType text/xml "access plus 0 seconds"
63 | # Favicon (cannot be renamed!)
64 | ExpiresByType image/x-icon "access plus 1 week"
65 | # HTML components (HTCs)
66 | ExpiresByType text/x-component "access plus 1 month"
67 | # HTML
68 | ExpiresByType text/html "access plus 0 seconds"
69 | # JavaScript
70 | ExpiresByType application/javascript "access plus 1 year"
71 | # Manifest files
72 | ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
73 | ExpiresByType text/cache-manifest "access plus 0 seconds"
74 | # Media
75 | ExpiresByType audio/ogg "access plus 1 month"
76 | ExpiresByType image/gif "access plus 1 month"
77 | ExpiresByType image/jpeg "access plus 1 month"
78 | ExpiresByType image/png "access plus 1 month"
79 | ExpiresByType video/mp4 "access plus 1 month"
80 | ExpiresByType video/ogg "access plus 1 month"
81 | ExpiresByType video/webm "access plus 1 month"
82 | # Web feeds
83 | ExpiresByType application/atom+xml "access plus 1 hour"
84 | ExpiresByType application/rss+xml "access plus 1 hour"
85 | # Web fonts
86 | ExpiresByType application/font-woff2 "access plus 1 month"
87 | ExpiresByType application/font-woff "access plus 1 month"
88 | ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
89 | ExpiresByType application/x-font-ttf "access plus 1 month"
90 | ExpiresByType font/opentype "access plus 1 month"
91 | ExpiresByType image/svg+xml "access plus 1 month"
92 |
93 | #-------------------------------------------------
94 |
95 | #-------------------------------------------------
96 | #**
97 | # Compress HTML, CSS, JavaScript, Text, XML and fonts
98 | #**
99 |
100 | AddOutputFilterByType DEFLATE application/javascript
101 | AddOutputFilterByType DEFLATE application/rss+xml
102 | AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
103 | AddOutputFilterByType DEFLATE application/x-font
104 | AddOutputFilterByType DEFLATE application/x-font-opentype
105 | AddOutputFilterByType DEFLATE application/x-font-otf
106 | AddOutputFilterByType DEFLATE application/x-font-truetype
107 | AddOutputFilterByType DEFLATE application/x-font-ttf
108 | AddOutputFilterByType DEFLATE application/x-javascript
109 | AddOutputFilterByType DEFLATE application/xhtml+xml
110 | AddOutputFilterByType DEFLATE application/xml
111 | AddOutputFilterByType DEFLATE font/opentype
112 | AddOutputFilterByType DEFLATE font/otf
113 | AddOutputFilterByType DEFLATE font/ttf
114 | AddOutputFilterByType DEFLATE image/svg+xml
115 | AddOutputFilterByType DEFLATE image/x-icon
116 | AddOutputFilterByType DEFLATE text/css
117 | AddOutputFilterByType DEFLATE text/html
118 | AddOutputFilterByType DEFLATE text/javascript
119 | AddOutputFilterByType DEFLATE text/plain
120 | AddOutputFilterByType DEFLATE text/xml
121 |
122 | # Remove browser bugs (only needed for really old browsers)
123 | BrowserMatch ^Mozilla/4 gzip-only-text/html
124 | BrowserMatch ^Mozilla/4\.0[678] no-gzip
125 | BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
126 | Header append Vary User-Agent
127 |
128 | #-------------------------------------------------
129 |
130 | #-------------------------------------------------
131 | #**
132 | # MIME types on Your Server
133 | #**
134 | AddType application/macbinhex-40 hqx
135 | AddType application/netalive net
136 | AddType application/netalivelink nel
137 | AddType application/octet-stream bin exe
138 | AddType application/oda oda
139 | AddType application/pdf pdf
140 | AddType application/postscript ai eps ps
141 | AddType application/rtf rtf
142 | AddType application/x-bcpio bcpio
143 | AddType application/x-cpio cpio
144 | AddType application/x-csh csh
145 | AddType application/x-director dcr
146 | AddType application/x-director dir
147 | AddType application/x-director dxr
148 | AddType application/x-dvi dvi
149 | AddType application/x-gtar gtar
150 | AddType application/x-hdf hdf
151 | AddType application/x-httpd-cgi cgi
152 | AddType application/x-latex latex
153 | AddType application/x-mif mif
154 | AddType application/x-netcdf nc cdf
155 | AddType application/x-onlive sds
156 | AddType application/x-sh sh
157 | AddType application/x-shar shar
158 | AddType application/x-sv4cpio sv4cpio
159 | AddType application/x-sv4crc sv4crc
160 | AddType application/x-tar tar
161 | AddType application/x-tcl tcl
162 | AddType application/x-tex tex
163 | AddType application/x-texinfo texinfo texi
164 | AddType application/x-troff t tr roff
165 | AddType application/x-troff-man man
166 | AddType application/x-troff-me me
167 | AddType application/x-troff-ms ms
168 | AddType application/x-ustar ustar
169 | AddType application/x-wais-source src
170 | AddType application/zip zip
171 | AddType audio/basic au snd
172 | AddType audio/x-aiff aif aiff aifc
173 | AddType audio/x-midi mid
174 | AddType audio/x-pn-realaudio ram
175 | AddType audio/x-wav wav
176 | AddType image/gif gif GIF
177 | AddType image/ief ief
178 | AddType image/jpeg jpeg jpg jpe JPG
179 | AddType image/tiff tiff tif
180 | AddType image/x-cmu-raster ras
181 | AddType image/x-portable-anymap pnm
182 | AddType image/x-portable-bitmap pbm
183 | AddType image/x-portable-graymap pgm
184 | AddType image/x-portable-pixmap ppm
185 | AddType image/x-rgb rgb
186 | AddType image/x-xbitmap xbm
187 | AddType image/x-xpixmap xpm
188 | AddType image/x-xwindowdump xwd
189 | AddType text/html html htm
190 | AddType text/plain txt
191 | AddType text/richtext rtx
192 | AddType text/tab-separated-values tsv
193 | AddType text/x-server-parsed-html shtml sht
194 | AddType text/x-setext etx
195 | AddType video/mpeg mpeg mpg mpe
196 | AddType video/quicktime qt mov
197 | AddType video/x-msvideo avi
198 | AddType video/x-sgi-movie movie
199 | AddType x-world/x-vrml wrl
200 | #-------------------------------------------------
--------------------------------------------------------------------------------
/resources/views/welcome.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Welcome!
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
458 |
459 |
460 |
461 |
462 |
463 |
464 | Welcome
465 |
466 |
467 |
468 |
469 | Welcome to Kiaan framework 👋!
470 |
471 | Easy, flexible and professional 🌷.
472 |
473 |
474 |
480 | Development by : Hassan Kerdash {{date('Y')}}.
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
--------------------------------------------------------------------------------
/resources/settings/configuration.php:
--------------------------------------------------------------------------------
1 | [
21 | "public" => "public"
22 | ],
23 | /*--------------------------------------------------------------------------
24 | | End
25 | --------------------------------------------------------------------------*/
26 |
27 | /*
28 | |--------------------------------------------------------------------------
29 | | Cross-Origin Resource Sharing
30 | |--------------------------------------------------------------------------
31 | |
32 | | Configuration of cross-origin resource sharing.
33 | |
34 | */
35 | 'cors' => [
36 | "enable" => true
37 | ],
38 | /*--------------------------------------------------------------------------
39 | | End
40 | --------------------------------------------------------------------------*/
41 |
42 | /*
43 | |--------------------------------------------------------------------------
44 | | Configuration
45 | |--------------------------------------------------------------------------
46 | |
47 | | Configuration of your application.
48 | |
49 | */
50 | 'configuration' => [
51 | "path" => "resources/config",
52 | "database" => [
53 | "table" => "configurations"
54 | ]
55 | ],
56 | /*--------------------------------------------------------------------------
57 | | End
58 | --------------------------------------------------------------------------*/
59 |
60 | /*
61 | |--------------------------------------------------------------------------
62 | | Notifications
63 | |--------------------------------------------------------------------------
64 | |
65 | | Notifications of your application.
66 | |
67 | */
68 | 'notifications' => [
69 | "table" => "notifications"
70 | ],
71 | /*--------------------------------------------------------------------------
72 | | End
73 | --------------------------------------------------------------------------*/
74 |
75 | /*
76 | |--------------------------------------------------------------------------
77 | | Controller
78 | |--------------------------------------------------------------------------
79 | |
80 | | Configurations controllers of your application.
81 | |
82 | */
83 | 'controller' => [
84 | "namespace" => 'App\\Application\\Controllers',
85 | "path" => 'application/controllers',
86 | "defaultMethod" => 'index'
87 | ],
88 | /*--------------------------------------------------------------------------
89 | | End
90 | --------------------------------------------------------------------------*/
91 |
92 | /*
93 | |--------------------------------------------------------------------------
94 | | Middleware
95 | |--------------------------------------------------------------------------
96 | |
97 | | Configurations middleware of your application.
98 | |
99 | */
100 | 'middleware' => [
101 | "namespace" => 'App\\Application\\Middleware',
102 | "path" => 'application/middleware',
103 | ],
104 | /*--------------------------------------------------------------------------
105 | | End
106 | --------------------------------------------------------------------------*/
107 |
108 | /*
109 | |--------------------------------------------------------------------------
110 | | Routes
111 | |--------------------------------------------------------------------------
112 | |
113 | | Configurations router of your application.
114 | |
115 | */
116 | 'router' => [
117 | 'enable' => true, // @bool :true or false @default false
118 | 'path' => 'resources/routes', // path
119 | 'web' => [ // API
120 | 'prefix' => '', // @string :url
121 | 'routes' => [ // @array :path
122 | 'web'
123 | ]
124 | ],
125 | 'api' => [ // API
126 | 'prefix' => '/api', // @string :url
127 | 'routes' => [ // @array :path
128 | 'api'
129 | ]
130 | ],
131 | 'default' => [ // Default
132 | 'method' => 'index', // @string :index
133 | ],
134 | ],
135 | /*--------------------------------------------------------------------------
136 | | End
137 | --------------------------------------------------------------------------*/
138 |
139 | /*
140 | |--------------------------------------------------------------------------
141 | | Views
142 | |--------------------------------------------------------------------------
143 | |
144 | | Configuration of views.
145 | |
146 | */
147 | 'views' => [
148 | "path" => "resources/views"
149 | ],
150 | /*--------------------------------------------------------------------------
151 | | End
152 | --------------------------------------------------------------------------*/
153 |
154 | /*
155 | |--------------------------------------------------------------------------
156 | | languages
157 | |--------------------------------------------------------------------------
158 | |
159 | | languages of your application.
160 | |
161 | */
162 | 'languages' => [
163 | "path" => "resources/lang",
164 | "defaultLang" => "en"
165 | ],
166 | /*--------------------------------------------------------------------------
167 | | End
168 | --------------------------------------------------------------------------*/
169 |
170 | /*
171 | |--------------------------------------------------------------------------
172 | | Database
173 | |--------------------------------------------------------------------------
174 | |
175 | | Customize the database of your application.
176 | |
177 | */
178 | "db" => [
179 | 'driver'=> getenv('Database_driver'),
180 | 'host'=> getenv('Database_host'), // @string :mysql, sqlite, pgsql, sqlsrv
181 | 'db' => getenv('Database_db'),
182 | 'user' => getenv('Database_user'),
183 | 'pass' => getenv('Database_pass'),
184 | 'port' => getenv('Database_port'),
185 | 'connect'=> getenv('Database_connect'),
186 | 'error'=> getenv('Database_error'),
187 | "path" => "databases/database",
188 | "auth" => [
189 | "table" => "users",
190 | "loginSession" => "auth",
191 | "fields" => [
192 | "primaryField" => "id",
193 | "idField" => "email",
194 | "passField" => "password",
195 | "tokenField" => "token",
196 | "jwtField" => "jwt"
197 | ],
198 | "jwt" => [
199 | "header" => "Authorization",
200 | "headerPrefix" => "Bearer",
201 | ],
202 | ],
203 | "models" => [
204 | "primaryKey" => "id",
205 | "namespace" => "App\\Databases\\Models",
206 | "path" => "databases/models",
207 | ],
208 | "migrations" => [
209 | "namespace" => "App\\Databases\\Migrations",
210 | "path" => "databases/migrations",
211 | "table" => "migrations"
212 | ],
213 | "seeds" => [
214 | "namespace" => "App\\Databases\\Seeds",
215 | "path" => "databases/seeds"
216 | ],
217 | ],
218 |
219 | /*--------------------------------------------------------------------------
220 | | End
221 | --------------------------------------------------------------------------*/
222 |
223 | /*
224 | |--------------------------------------------------------------------------
225 | | Email
226 | |--------------------------------------------------------------------------
227 | |
228 | | Email configuration of your application.
229 | |
230 | */
231 | 'mail' => [
232 | "driver" => getenv('Email_Driver'),
233 | 'from' => [
234 | "email" => getenv('Email_email'),
235 | "name" => getenv('Email_name'),
236 | ],
237 | 'host'=> getenv('Email_host'),
238 | 'username'=> getenv('Email_username'),
239 | 'password'=> getenv('Email_password'),
240 | 'port'=> getenv('Email_port'),
241 | 'protocol'=> getenv('Email_secure'), // null || tls || ssl
242 | ],
243 | /*--------------------------------------------------------------------------
244 | | End
245 | --------------------------------------------------------------------------*/
246 |
247 | /*
248 | |--------------------------------------------------------------------------
249 | | Security
250 | |--------------------------------------------------------------------------
251 | |
252 | | Configurations for security
253 | |
254 | */
255 | 'security' => [ // Security
256 | 'method'=> [ // Methods of request
257 | 'input' => '_method', // @string :name || default :_method
258 | ],
259 | 'csrf' => [ // Cross-site request forgery
260 | 'enable' => true, // @bool :true or false
261 | 'key' => '_csrf', // @string :name || default :_csrf
262 | 'input' => '_csrf', // @string :name || default :_csrf
263 | ],
264 | ],
265 | /*--------------------------------------------------------------------------
266 | | End
267 | --------------------------------------------------------------------------*/
268 |
269 | /*
270 | |--------------------------------------------------------------------------
271 | | Validator
272 | |--------------------------------------------------------------------------
273 | |
274 | | Customize the validator of the framework.
275 | |
276 | */
277 | "validator" => [
278 | "namespace" => "App\\Application\\Validator",
279 | "path" => "application/validator"
280 | ],
281 | /*--------------------------------------------------------------------------
282 | | End
283 | --------------------------------------------------------------------------*/
284 |
285 | /*
286 | |--------------------------------------------------------------------------
287 | | Events
288 | |--------------------------------------------------------------------------
289 | |
290 | | Configurations events of your application.
291 | |
292 | */
293 | 'events' => [
294 | "namespace" => 'App\\Application\\Events',
295 | "path" => 'application/events',
296 | ],
297 | /*--------------------------------------------------------------------------
298 | | End
299 | --------------------------------------------------------------------------*/
300 |
301 | /*
302 | |--------------------------------------------------------------------------
303 | | Cli
304 | |--------------------------------------------------------------------------
305 | |
306 | | Customize the cli of the framework.
307 | |
308 | */
309 | "cli" => [
310 | "namespace" => "App\\Application\\Cli",
311 | "path" => "application/cli",
312 | ],
313 | /*--------------------------------------------------------------------------
314 | | End
315 | --------------------------------------------------------------------------*/
316 |
317 | /*
318 | |--------------------------------------------------------------------------
319 | | Helpers
320 | |--------------------------------------------------------------------------
321 | |
322 | | Helpers application.
323 | |
324 | */
325 | 'helpers' => [
326 | "path" => "application/helpers/helpers"
327 | ],
328 | /*--------------------------------------------------------------------------
329 | | End
330 | --------------------------------------------------------------------------*/
331 |
332 | /*
333 | |--------------------------------------------------------------------------
334 | | Debug
335 | |--------------------------------------------------------------------------
336 | |
337 | | Configurations for debug
338 | |
339 | */
340 | 'debug' => [ // debug
341 | 'enable' => getenv('APP_debug'), // @bool :true or false @default false
342 | '404' => [ // Not found
343 | 'page' => null, // @string :path | @null :page 404 of Kiaan framework
344 | 'template' => true, // @bool :true or false @default false
345 | ],
346 | '500' => [ // Internal server error
347 | 'page' => null, // @string :path | @null :page 500 of Kiaan framework
348 | 'template' => true, // @bool :true or false @default false
349 | ],
350 | ],
351 | /*--------------------------------------------------------------------------
352 | | End
353 | --------------------------------------------------------------------------*/
354 |
355 | ];
--------------------------------------------------------------------------------