Giter VIP home page Giter VIP logo

ryxo's Introduction

Ryxo Framework

Introduction

Welcome to the documentation for the Ryxo Framework. Ryxo is a lightweight PHP framework designed to provide a simple yet powerful foundation for building web applications.

Getting Started

Installation

To install Ryxo, follow these steps:

  1. Clone the repository: git clone https://github.com/gyanendra-baghel/ryxo.git
  2. Install dependencies: composer install

Configuration

  • Autoloading: Ryxo follows the PSR-4 autoloading standard. Make sure the App namespace points to your app/ directory.
"autoload": {
    "psr-4": {
        "App\\": "app/"
    }
}

Routing

Define routes in the routes.php file:

// routes.php
$app->get('/', [SiteController::class,'index');
$app->get('/blogs/{id}',function($req, $res, $params){
    // ...
});

Templating

Ryxo includes a basic templating engine. Views are located in the app/views directory.

Run the Application

Run the built-in PHP server:

php -S localhost:8000 -t public

Visit http://localhost:8000 in your browser.

Features

Routing

Ryxo provides a simple routing system to handle HTTP requests. Define routes in the routes.php file using the get and post methods.

$app->get('/path', Controller::class,'method');

Templating

The included templating engine allows you to render views easily. Use the render method in your controllers.

// Inside a controller method
return $this->response->render('viewName', ['data' => $data]);

Controllers

Create controllers in the app/Controllers directory. Controllers handle the logic for specific routes.

// Example HomeController
namespace App\Controllers;
use Ryxo\Controller;

class HomeController extends Controller
{
    public function index()
    {
        return $this->response->render('home');
    }
}

Contributing

We welcome contributions to Ryxo! Follow the guidelines in the CONTRIBUTING.md file.

License

Ryxo is open-source software licensed under the MIT License.

Support

For support, please open an issue on the GitHub repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.