Welcome to PhpSlides!
This framework is a PHP revolution,
designed to provide a simple and scalable structure for developing full-stack web applications
using the Model-View-Controller (MVC) architectural pattern.
With PhpSlides, you can write HTML, CSS, and JavaScript in a PHP-like way, streamlining the development process and enhancing productivity.
- PhpSlides
PhpSlides is a lightweight, easy-to-use full-stack framework that helps you build web applications quickly and efficiently. It follows the MVC architectural pattern, separating the application logic into models, views, and controllers to promote code organization and reusability.
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.
- Full-Stack Development: Seamlessly integrate front-end and back-end development by writing HTML, CSS, and JavaScript in a PHP-like syntax.
- Simple Routing: Easily define routes and map them to controllers and actions.
- Modular Structure: Organized directory structure for models, views, controllers, and other components.
- Database Abstraction: Simple and flexible database handling with a query builder.
- Middleware Support: Add middleware to handle authentication, logging, and other tasks.
- PHP 8.2 or higher
- Composer
- A web server (e.g., Apache, Nginx)
composer create-project phpslides/phpslides ProjectName
cd ProjectName
-
Clone the repository:
git clone https://github.com/phpslides/phpslides.git cd phpslides
-
Install dependencies:
composer install
-
Set up the web server:
Point your web server to the document root.
-
Configure the environment:
If the .env file does not exist, copy the env example configuration file and update it with your settings:
cp .env.example .env
Edit the .env file to configure database settings, application settings, and other configurations.
APP_NAME=PhpSlides
APP_VERSION=1.2.9
APP_DEBUG=true
APP_ENV=development
{
"public": {
"/": ["*"],
"assets": ["*"],
"images": ["image"],
"videos": ["video"],
"audios": ["audio"],
"styles": ["css", "scss", "sass"],
"css": ["css", "scss", "sass"],
"src": ["js", "ts", "css", "scss", "sass"],
"png": ["png"],
"jpg": ["jpg"],
"svg": ["svg"]
},
"charset": "UTF-8"
}
<?php
DOM::create('app')->root([
['id' => 'root'],
Tag::Container([],
Tag::Input(['type' => 'text'], '$$name')
Tag::Text([], 'Hello $$name')
)
]);
DOM::render('app');
?>
<?php
$style = StyleSheet::create([
'RootStyle' => [
Style::Size => Screen::100,
Style::BackgroundImage => asset('bg.png'),
],
'TextStyle' => [
Style::Color => Color::White,
Style::FontSize => Font::Base,
Style::FontWeight => Font::Bold
]
]);
export($style, 'AppStyle');
?>
<?php
Route::map(POST, '/index')
->action('Controller::method')
->name('index');
?>
<?php
Api::v1()->define('/user', 'UserController')
->map([
'/info' => [GET, '@index'],
'/{id}' => [GET, '@show'],
])
->withGuard('auth')
->name('user');
$user_id_route = route('user::1');
?>
Here's an overview of the project directory structure:
project_root/
├── app/
│ ├── Controller/
│ ├── Guards/
│ ├── Forge/
├── public/
├── src/
│ ├── bootstrap/
│ ├── configs/
│ ├── resources/
│ │ └── views/
├── vendor/
├── .env
├── .env.example
├── .htaccess
├── composer.json
├── configs.json
├── LICENSE
├── README.md
└── slide
For detailed documentation, including advanced usage, API references, and more, please visit our documentation website.
We welcome contributions from the community! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch (git checkout -b name/your-feature).
- Commit your changes (git commit -am 'Add a new feature').
- Push to the branch (git push origin name/your-feature).
- Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for more details.
Your contributions help us maintain and improve PhpSlides. If you find PhpSlides useful, please consider supporting us financially. Every bit of support goes a long way in ensuring we can continue to develop and enhance the framework.