PHPackages                             mudrock/mudrock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. mudrock/mudrock

ActiveProject[Framework](/categories/framework)

mudrock/mudrock
===============

A PHP Framework MVC

1.2.1(3y ago)320MITPHPPHP ^7.3|^8.0

Since Nov 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Mudrock-Framework/Mudrock)[ Packagist](https://packagist.org/packages/mudrock/mudrock)[ RSS](/packages/mudrock-mudrock/feed)WikiDiscussions 1.x Synced 6d ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

Mudrock Framework
=================

[](#mudrock-framework)

[![GitHub go.mod Go version of a Go module](https://camo.githubusercontent.com/fce77a4b2e79d70e563136ddd84c09b645df3a5424ac105c515107c79b157d5e/68747470733a2f2f62616467656e2e6e65742f62616467652f566572732543332541336f2f312e322e312f677265656e)](https://camo.githubusercontent.com/fce77a4b2e79d70e563136ddd84c09b645df3a5424ac105c515107c79b157d5e/68747470733a2f2f62616467656e2e6e65742f62616467652f566572732543332541336f2f312e322e312f677265656e) [![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667) [![PHP Version Require](https://camo.githubusercontent.com/916d0b93f1fd2dd3db65394e075ae19fa1c8cd878e7d18d28259fd15161dc266/687474703a2f2f706f7365722e707567782e6f72672f6261646765732f706f7365722f726571756972652f706870)](https://packagist.org/mudrock/mudrock)

---

💡 Mudrock is a MVC PHP framework, which was inspired by the Laravel and CodeIgniter frameworks.
Discover all the features:

Table of Contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#install)
- [Routes](#routes)
    - [Allowed request types](#allowed_requests)
    - [How to define routes](#how_to_define_routes)
- [Translations](#translations)

Requirements
-----------------------------------------------------

[](#requirements-)

- [Composer](https://getcomposer.org/)
- [Docker](https://www.docker.com/)

Installation
------------------------------------------------

[](#installation-)

- Install by **Composer:**

```
composer create-project mudrock/mudrock my-project
```

- Run by **Docker:**

```
cd my-project
docker-compose up
```

- Now open your browser and access the URL:

Routes
----------------------------------------

[](#routes)

### Allowed request types:

[](#allowed-request-types)

- GET
- POST

### How to define routes:

[](#how-to-define-routes)

- All routes must be defined in the file:

```
app/config/routes.php
```

- You can declare the route using a method of some Controller:

```
$this->get('/MyRoute', 'MyController@MyFunction');
```

- Or simply define a callback:

```
$this->get('/MyRoute', function(){
    return "This is my callback when accessing this route";
});
```

Translations:
-----------------------------------------------------

[](#translations)

With the translations feature it is possible to have multiple languages in your project. All this simply quickly!

- First, you need to create a folder named after the desired language. For example, we will use the language "Portuguese". So, we create the folder as desired:

```
app/languages/portuguese/
```

- Now we need to create the files with the translations. We recommend creating a file for each Controller:

```
app/languages/portuguese/MyController.php
```

- In the created file ("MyController.php"), we will have a structure similar to this:

```
