https://github.com/erdum/php-weekend
A simple minimal set of functions provide you the ability to build API & web application with no setup time
https://github.com/erdum/php-weekend
hacktoberfest laravel php php-library php-package php-router php-router-standalone
Last synced: about 1 month ago
JSON representation
A simple minimal set of functions provide you the ability to build API & web application with no setup time
- Host: GitHub
- URL: https://github.com/erdum/php-weekend
- Owner: erdum
- Created: 2023-07-15T09:59:29.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-05-14T19:51:53.000Z (9 months ago)
- Last Synced: 2025-06-17T12:04:48.553Z (8 months ago)
- Topics: hacktoberfest, laravel, php, php-library, php-package, php-router, php-router-standalone
- Language: PHP
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP-Weekend
A simple minimal set of functions provide you the ability to build API & web application with no setup time

## Table of Contents
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Feedback](#feedback)
- [Contributors](#contributors)
- [License](#license)
## Features
- Routing with dynamic routes
- Templating
- Method for accessing request data
- Method for sending json data
- Customizable
- No design restriction build your API in anyway you want
- Zero configuration
## Installation
Install PHP-Weekend with composer
```bash
composer require erdum/php-weekend
```
Or install without composer on older PHP versions just copy the src directory and require the App.php and Router.php
```php
'Hello, World!'));
});
Router::get('/simple', function() {
App::send_response('This is the content.', 200, 'text/html');
});
Router::get('/get_pdf', function() {
App::send_file(__DIR__ . '/static/my_file.pdf');
});
```
## Usage
After installing the package your project directory will have the following
```bash
ls
```
- composer.json
- composer.lock
- vendor
Create an index.php file
```php
'Hello, World!']);
});
/*
Router also have
post
put
patch
delete
any
*/
```
You can get request data submitted in any format with a single function
- query Parameters
- form-data
- multipart/form-data
- application/json
```php
$request_payload], 201);
});
```
You can also build dynamic routes
```php
$name]);
});
```
You can also use templates create a directory called templates in your project root
```bash
mkdir templates
```
inside your templates directory you can build your templates like home.php
```php
= $data ?>
= $foo ?>
18): ?>
Hello
whatsapp
```
now you can render home.php template from your index file
```php
'Hello, World!',
'foo' => 'bar',
'age' => 18
]);
});
```
App also provides you the csrf functionality
```php
= set_csrf() ?>
```
now verify the csrf token in the handler
```php

## License
[](https://choosealicense.com/licenses/mit/)