Skip to content

Commit 023f817

Browse files
committed
Make updated with framework version 1.3.4
1 parent 390197c commit 023f817

File tree

28 files changed

+396
-141
lines changed

28 files changed

+396
-141
lines changed

Console/autoload.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/**
1616
* Load all Class
1717
*/
18+
include_once __DIR__ . '/../src/Loader/HotReload.php';
1819
include_once __DIR__ . '/../src/Server.php';
1920
include_once __DIR__ . '/../src/Command.php';
2021
/**

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"authors": [
66
{
77
"name": "dconco",
8-
"email": "concodave@gmail.com"
8+
"email": "info@dconco.io"
99
}
1010
],
1111
"bin": ["bin/phpslides"],

project/.env

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
APP_NAME=PhpSlides
2-
APP_VERSION=1.3.3
3-
APP_DEBUG=true
2+
APP_VERSION=1.3.4
43
APP_ENV=development
54
APP_URL=http://localhost
65
JWT_SECRET=
76

7+
# DATABASE INFORMATION
88
DB_CONN=mysql
99
DB_PORT=3306
1010
DB_HOST=0.0.0.0
1111
DB_USER=root
1212
DB_PASS=
13-
DB_DEBUG=true
1413

15-
SMTP_HOST=smtp.example.com
14+
# MAIL SMTP INFORMATION
1615
SMTP_PORT=587
16+
SMTP_HOST=smtp.example.com
1717
SMTP_USERNAME=your_email@example.com
1818
SMTP_PASSWORD=your_password
1919
SMTP_FROM=your_email@example.com
20-
SMTP_FROM_NAME='Your SMTP_FROM_NAME'
20+
SMTP_FROM_NAME='Your SMTP_FROM_NAME'
21+
22+
# DEBUG MODE
23+
HOT_RELOAD=true
24+
APP_DEBUG=true
25+
DB_DEBUG=true

project/.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/node_modules
2+
/public/build
3+
/public/storage
4+
/storage/*.key
5+
/vendor
6+
/.idea
7+
/.vscode
8+
.log
9+
.env
10+
.env.dev
11+
.env.development
12+
log
13+
*.log
14+
access_log
15+
composer.lock
16+
composer.phar

project/.htaccess

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414

1515
# Send Request to bootstrap configuration
1616
RewriteCond %{REQUEST_FILENAME} !-d|-f
17-
RewriteRule ^(.*)$ src/bootstrap/app.php?uri=$1 [QSA,L]
17+
RewriteRule ^(.*)$ src/routes/render.php?uri=$1 [QSA,L]
1818
</IfModule>

project/LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Custom License Based on MIT
2+
3+
Copyright (c) 2023 Dave Conco - The PhpSlides Framework
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 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.
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
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,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

project/README.md

Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
# PhpSlides
2+
3+
<p align="center">
4+
<a href="https://packagist.org/packages/phpslides/framework"><img src="https://img.shields.io/packagist/dt/phpslides/framework" alt="Total Downloads"></a>
5+
<a href="https://packagist.org/packages/phpslides/framework"><img src="https://img.shields.io/packagist/v/phpslides/framework" alt="Latest Stable Version"></a>
6+
<a href="https://packagist.org/packages/phpslides/framework"><img src="https://img.shields.io/packagist/l/phpslides/framework" alt="License"></a>
7+
</p>
8+
9+
Welcome to PhpSlides!<br>
10+
This framework is a PHP revolution,
11+
designed to provide a simple and scalable structure for developing full-stack web applications
12+
using the Model-View-Controller (MVC) architectural pattern.
13+
14+
With PhpSlides, you can write HTML, CSS, and JavaScript in a PHP-like way,
15+
streamlining the development process and enhancing productivity.
16+
17+
## Table of Contents
18+
19+
- [PhpSlides](#phpslides)
20+
- [Table of Contents](#table-of-contents)
21+
- [Introduction](#introduction)
22+
- [Features](#features)
23+
- [Requirements](#requirements)
24+
- [Installation](#installation)
25+
- [Install with Composer](#install-with-composer)
26+
- [Or Clone the Repository](#or-clone-the-repository)
27+
- [Configuration](#configuration)
28+
- [.env](#env)
29+
- [configs.json](#configjson)
30+
- [Syntax](#syntax)
31+
- [Creating Web Layouts](#creating-web-layouts)
32+
- [Styling Web Layouts](#styling-web-layouts)
33+
- [Creating Web Routes](#creating-web-routes)
34+
- [Creating API Routes](#creating-api-routes)
35+
- [Directory Structure](#directory-structure)
36+
- [Documentation](#documentation)
37+
- [Contributing](#contributing)
38+
- [License](#license)
39+
- [Financial Support](#financial-support)
40+
41+
## Introduction
42+
43+
PhpSlides is a lightweight, easy-to-use full-stack framework that helps you build web applications quickly and efficiently.
44+
It follows the MVC architectural pattern, separating the application logic into models, views, and controllers to promote code organization and reusability.
45+
46+
Additionally, it provides the capability to write HTML, CSS, and JavaScript in a PHP-like way, making it easier to manage and maintain your front-end and back-end code together.
47+
48+
## Features
49+
50+
- **Full-Stack Development**: Seamlessly integrate front-end and back-end development by writing HTML, CSS, and JavaScript in a PHP-like syntax.
51+
- **Simple Routing**: Easily define routes and map them to controllers and actions.
52+
- **Modular Structure**: Organized directory structure for models, views, controllers, and other components.
53+
- **Database Forgery**: A unique feature that allows you to manage your databases and tables using a structured directory format, automatically generating and managing schema migrations based on directory and file structures.
54+
- **AuthGuard Support**: Add authorization guard to handle authentication, logging, and other tasks.
55+
56+
## Requirements
57+
58+
- PHP 8.2 or higher
59+
- Composer
60+
- A web server (e.g., Apache, Nginx)
61+
62+
## Installation
63+
64+
### Install with Composer
65+
66+
```bash
67+
composer create-project phpslides/phpslides ProjectName
68+
cd ProjectName
69+
```
70+
71+
### Or Clone the Repository
72+
73+
1. **Clone the repository:**
74+
75+
```bash
76+
git clone https://github.com/phpslides/phpslides.git
77+
cd phpslides
78+
```
79+
80+
2. **Install dependencies:**
81+
82+
```bash
83+
composer install
84+
```
85+
86+
3. **Set up the web server:**
87+
88+
Point your web server to the document root.
89+
90+
4. **Configure the environment:**
91+
92+
If the .env file does not exist, copy the env example configuration file and update it with your settings:
93+
94+
```bash
95+
cp .env.example .env
96+
```
97+
98+
## Configuration
99+
100+
### .env
101+
102+
Edit the .env file to configure database settings, application settings, and other configurations.
103+
104+
```bash
105+
APP_NAME=PhpSlides
106+
APP_VERSION=1.3.x
107+
APP_DEBUG=true
108+
APP_ENV=development
109+
```
110+
111+
### config.json
112+
113+
Which handles the behavior of a viewing files on the web
114+
115+
```json
116+
{
117+
"deny": ["public/assets/*.png"],
118+
"message": {
119+
"contents": "403 | Forbidden",
120+
"components": "Errors::403",
121+
"content-type": "text/html"
122+
},
123+
"charset": "UTF-8"
124+
}
125+
```
126+
127+
## Syntax
128+
129+
### Creating Web Layouts
130+
131+
```php
132+
<?php
133+
134+
DOM::create('app')->root([
135+
['id' => 'root'],
136+
Tag::Container([],
137+
Tag::Input(['type' => 'text'], '$$name')
138+
Tag::Text([], 'Hello $$name')
139+
)
140+
]);
141+
142+
DOM::render('app');
143+
144+
?>
145+
```
146+
147+
### Styling Web Layouts
148+
149+
```php
150+
<?php
151+
152+
$style = StyleSheet::create([
153+
'RootStyle' => [
154+
Style::Size => Screen::100,
155+
Style::BackgroundImage => asset('bg.png'),
156+
],
157+
'TextStyle' => [
158+
Style::Color => Color::White,
159+
Style::FontSize => Font::Base,
160+
Style::FontWeight => Font::Bold
161+
]
162+
]);
163+
164+
export($style, 'AppStyle');
165+
166+
?>
167+
```
168+
169+
### Creating Web Routes
170+
171+
```php
172+
<?php
173+
174+
Route::map(POST, '/index')
175+
->action('Controller::method')
176+
->name('index');
177+
178+
?>
179+
```
180+
181+
### Creating API Routes
182+
183+
```php
184+
<?php
185+
186+
Api::v1()->define('/user', 'UserController')
187+
->map([
188+
'/info' => [GET, '@index'],
189+
'/{id}' => [GET, '@show'],
190+
])
191+
->withGuard('auth')
192+
->name('user');
193+
194+
$user_id_route = route('user::1');
195+
196+
?>
197+
```
198+
199+
## Directory Structure
200+
201+
Here's an overview of the project directory structure:
202+
203+
project_root/<br>
204+
├── app/<br>
205+
│ ├── Controller/<br>
206+
│ ├── Guards/<br>
207+
│ ├── Forge/<br>
208+
├── public/<br>
209+
├── src/<br>
210+
│ ├── bootstrap/<br>
211+
│ ├── configs/<br>
212+
│ ├── resources/<br>
213+
│ │ └── views/<br>
214+
├── vendor/<br>
215+
├── .env<br>
216+
├── .env.example<br>
217+
├── .htaccess<br>
218+
├── composer.json<br>
219+
├── configs.json<br>
220+
├── LICENSE<br>
221+
├── README.md<br>
222+
└── slide
223+
224+
## Documentation
225+
226+
For detailed documentation, including advanced usage,
227+
API references, and more, please visit our [documentation website](#).
228+
229+
## Contributing
230+
231+
We welcome contributions from the community!
232+
If you'd like to contribute,
233+
please follow these steps:
234+
235+
<ol>
236+
<li>Fork the repository.</li>
237+
<li>Create a new branch (git checkout -b name/your-feature).</li>
238+
<li>Commit your changes (git commit -am 'Add a new feature').</li>
239+
<li>Push to the branch (git push origin name/your-feature).</li>
240+
<li>Create a new Pull Request.</li>
241+
</ol>
242+
243+
## License
244+
245+
This project is licensed under the MIT License. See the [LICENSE](https://github.com/PhpSlides/phpslides/blob/master/LICENSE) file for more details.
246+
247+
## Financial Support
248+
249+
Your contributions help us maintain and improve PhpSlides.
250+
If you find PhpSlides useful, please consider supporting us financially.
251+
Every bit of support goes a long way in ensuring we can continue to develop and enhance the framework.
252+
253+
[Support Now!](https://buymeacoffee.com/dconco)

project/app/Forge/SchemaDb/Customers/2-name

Lines changed: 0 additions & 4 deletions
This file was deleted.

project/app/Forge/SchemaDb/Customers/3-email

Lines changed: 0 additions & 4 deletions
This file was deleted.

project/app/Forge/SchemaDb/Customers/4-password

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)