Skip to content

Commit 7fdb966

Browse files
authoredNov 9, 2024
Merge pull request #40 from PhpSlides/dev
Rearranged template to v1.3.5
2 parents 2bb3f35 + 7595e2e commit 7fdb966

File tree

21 files changed

+162
-157
lines changed

21 files changed

+162
-157
lines changed
 

‎.env.example

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
APP_NAME=PhpSlides
2-
APP_VERSION=1.3.4
2+
APP_VERSION=1.3.5
33
APP_ENV=development
44
APP_URL=http://localhost
55
JWT_SECRET=

‎LICENSE

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
Custom License Based on MIT
1+
MIT License
22

3-
Copyright (c) 2023 Dave Conco - The PhpSlides Framework
3+
Copyright (c) 2024 The PhpSlides Framework
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to use
7-
the Software strictly for personal, non-commercial purposes, subject to the following conditions:
8-
9-
- Redistribution, modification, merging, publishing, sublicensing, and/or selling copies of the Software are strictly prohibited.
10-
- The Software, in whole or in part, may not be copied, cloned, or incorporated into other software or projects.
11-
- The Software, in whole or in part, may not be used for any commercial purposes without the explicit written permission of the copyright holder.
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:
1211

1312
The above copyright notice and this permission notice shall be included in all
1413
copies or substantial portions of the Software.
1514

1615
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1716
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18-
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
20-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM,
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,
2120
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22-
SOFTWARE.
21+
SOFTWARE.

‎app/Controller/Api/.gitignore

Whitespace-only changes.

‎app/Forgery/SchemaDb/Customers/3-email

-4
This file was deleted.

‎app/Forgery/SchemaDb/Customers/4-password

-3
This file was deleted.

‎app/Forgery/SchemaDb/Customers/Customers.php

-9
This file was deleted.

‎app/Forgery/SchemaDb/Users/Users.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
namespace Forgery\SchemaDb\Users;
4+
5+
use PhpSlides\Database\Database;
6+
7+
class Users extends Database
8+
{
9+
}
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
TYPE => VARCHAR
22
LENGTH => 50
3-
INDEX => TRUE
4-
NULL => FALSE
3+
NULL => FALSE
4+
INDEX => TRUE

‎app/Forgery/SchemaDb/options.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ UNIQUE => TRUE|FALSE
77
DEFAULT => NULL|0|CURRENT_TIMESTAMP # or any default value
88
INDEX => TRUE|FALSE
99
FOREIGN => TRUE|FALSE # If true, it's used as this column name and enable REFERENCES & DELETE to work
10-
REFERENCES => TABLE_NAME(COLUMN_NAME)|TABLE_NAME(%this%) # %this% is used for specifying this current column
10+
REFERENCES => TABLE_NAME(COLUMN_NAME)|__table__(COLUMN_NAME) # __table__ is used for specifying this current table
1111
DELETE => CASCADE|SET NULL|RESTRICT|NO ACTION|SET DEFAULT
1212
UPDATE => CASCADE|SET NULL|RESTRICT|NO ACTION|SET DEFAULT|CURRENT_TIMESTAMP
1313
CHECK => expression # (e.g. 'age > 0')

‎app/Http/Api/AdminEndpoint.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace App\Http\Api;
4+
5+
use PhpSlides\Http\Request;
6+
use PhpSlides\Http\ApiController;
7+
8+
final class AdminEndpoint extends ApiController
9+
{
10+
public function index(Request $request)
11+
{
12+
return '';
13+
}
14+
}
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace App\Http\Controller;
4+
5+
use PhpSlides\Http\Request;
6+
7+
final class UserController
8+
{
9+
public function index(Request $request)
10+
{
11+
return '';
12+
}
13+
}

‎composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "phpslides/phpslides",
33
"description": "The skeleton application for the PhpSlides framework.",
4-
"homepage": "https://github.com/phpslides",
4+
"homepage": "https://github.com/PhpSlides",
55
"type": "project",
66
"keywords": ["phpslides", "framework"],
77
"license": "MIT",
@@ -14,14 +14,14 @@
1414
"authors": [
1515
{
1616
"name": "Dave Conco",
17-
"email": "concodave@gmail.com",
17+
"email": "info@dconco.dev",
1818
"role": "Developer",
19-
"homepage": "https://dconco.github.io"
19+
"homepage": "https://dconco.dev"
2020
}
2121
],
2222
"require": {
2323
"php": "^8.2",
24-
"phpslides/framework": "^1.3.2"
24+
"phpslides/framework": "^1.3.4"
2525
},
2626
"config": {
2727
"optimize-autoloader": true,

‎src/configs/cors.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717

1818
return [
1919
/*
20-
*? Specific domains that are allowed to access your resources.
20+
* Specific domains that are allowed to access your resources.
2121
*/
2222
'allow_origin' => '*',
2323

2424
/*
25-
*? The HTTP methods that are allowed for CORS requests.
25+
* The HTTP methods that are allowed for CORS requests.
2626
*/
2727
'allow_methods' => ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
2828

2929
/*
30-
*? Headers that are allowed in CORS requests.
30+
* Headers that are allowed in CORS requests.
3131
*/
3232
'allow_headers' => [
3333
'Content-Type',
@@ -40,22 +40,22 @@
4040
],
4141

4242
/*
43-
*? Headers that browsers are allowed to access.
43+
* Headers that browsers are allowed to access.
4444
*/
45-
# 'expose_headers' => ['Content-Length', 'Content-Range', 'X-Custom-Header'],
45+
'expose_headers' => ['Content-Length', 'Content-Range', 'X-Custom-Header'],
4646

4747
/*
48-
*? The maximum time (in seconds) the results of a preflight request can be cached.
48+
* The maximum time (in seconds) the results of a preflight request can be cached.
4949
*/
5050
'max_age' => 3600,
5151

5252
/*
53-
*? Indicates whether the request can include user credentials.
53+
* Indicates whether the request can include user credentials.
5454
*/
5555
'allow_credentials' => true,
5656

5757
/*
58-
*? Another toggle for allowing credentials, ensuring clarity.
58+
* Another toggle for allowing credentials, ensuring clarity.
5959
*/
6060
'supports_credentials' => true
61-
];
61+
];

‎src/resources/views/App.psl

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<? $text = 'Click to view documentation'; ?>
2+
3+
<!DOCTYPE html>
4+
<html lang="en">
5+
6+
<head>
7+
<title>Dashboard | PhpSlides</title>
8+
<include path="components/Header" />
9+
10+
<style>
11+
.logo {
12+
width: 45%;
13+
animation: ReSeize 1.3s ease-in-out infinite;
14+
}
15+
16+
.logo img {
17+
width: 100%;
18+
}
19+
20+
.description,
21+
.link {
22+
margin: auto;
23+
color: wheat;
24+
font-size: 15px;
25+
text-align: center;
26+
font-weight: 400;
27+
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
28+
}
29+
30+
.link {
31+
text-decoration: underline;
32+
}
33+
34+
.link:hover {
35+
color: whitesmoke;
36+
}
37+
</style>
38+
</head>
39+
40+
41+
<!-- View Contents Begins -->
42+
43+
<body>
44+
<div class="container">
45+
<div class="logo">
46+
<img src="{{ import('../assets/logo.svg') }}" alt="PhpSlides Logo">
47+
</div>
48+
49+
<div class="description">
50+
<p>
51+
PhpSlides let you create a secured Routing in php and secured API, which prevents SQL injections, and from XSS attack & CSRF.
52+
<br>
53+
</p>
54+
<p>
55+
<a href="//packagist.org/packages/phpslides/phpslides" class="link">{{ $text }}</a>
56+
</p>
57+
</div>
58+
59+
<a href="{{ asset('any') }}">
60+
<button class="btn">Navigate To Not Found Page</button>
61+
</a>
62+
</div>
63+
</body>
64+
65+
</html>

‎src/resources/views/app.view.php

-78
This file was deleted.

‎src/resources/views/components/Header.php ‎src/resources/views/components/Header.psl

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
33
<meta name="title" content="PhpSlides | PHP Framework" />
44

5-
<link rel="apple-touch-icon" href={{ asset('Assets::Icon.png') }} sizes="234x234" />
6-
<link rel="shortcut icon" href={{ asset('Assets::Icon.png') }} type="image/png" />
7-
<link rel="icon" href={{ asset('Assets::Icon.png') }} type="image/png" />
5+
<link rel="apple-touch-icon" href="{{ asset('Assets::Icon.png') }}" sizes="234x234" />
6+
<link rel="shortcut icon" href="{{ asset('Assets::Icon.png') }}" type="image/png" />
7+
<link rel="icon" href="{{ asset('Assets::Icon.png') }}" type="image/png" />
88

99
<!-- Internal Styling -->
1010
<style>

‎src/resources/views/errors/404.view.php

-28
This file was deleted.

0 commit comments

Comments
 (0)