πŸ’‘ Mudrock is a MVC PHP framework, which was inspired by the Laravel and CodeIgniter frameworks.

Related tags

Frameworks Mudrock
Overview

Mudrock Framework

GitHub go.mod Go version of a Go module     License     PHP Version Require


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


Table of Contents


Requirements


Installation

  • Install by Composer:
composer create-project mudrock/mudrock my-project

  • Run by Docker:
cd my-project
docker-compose build
docker-compose up

  • Now open your browser and access the URL:
https://localhost:8000

Routes


Allowed request types:

  • GET
  • POST

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:

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:


return [
    'my_phrase' => 'My sentence translated to the desired language'
];

  • Now we need to load this translation file into the "construct" method of the Controller file:

namespace app\controllers;
use system\core\Controller;

class Welcome extends Controller {

    public function __construct() {
        $this->load_language('MyController');
    }

}
?>

  • Once that's done, we can now use our translation in the Controller and also in the View we are using:
$this->lang('my_phrase');
You might also like...
TrailLamp is a lightweight, easy-to-use Php MVC framework that can be used to build web applications and REST APIs.

TrailLamp Introduction TrailLamp is a lightweight, easy-to-use Php MVC framework that can be used to build web applications and REST APIs. Installatio

A simple PHP MVC framework without extra files and codes that you don't need

Welcome to (SPM) Simple PHP MVC, just what you need! This is a simple PHP MVC framework without extra files and codes that you don't need.

A super fast, customizable and lightweight PHP MVC Starter Framework to extend for your own...

PHPMVC A super fast, customizable and lightweight PHP MVC Starter Framework to extend for your own... How to Start Clone this repo - git clone https:/

a framework for WebDevelop based on the mvc structure. The name of this project for Fun because everyone can use it. Completely simple and powerful structure for all your projects

A_A (-.-) β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„ |-| β–ˆβ–„β”€β–„β–„β”€β–ˆβ–„β”€β–ˆβ–ˆβ”€β–„β–ˆβ”€β–„β–„β–„β–„β–ˆβ”€β–„β–„β–„β–„β–ˆβ–„β”€β–ˆβ”€β–„β–ˆβ”€β–„β–„β–„β”€β–ˆβ–ˆβ–€β–„β”€β–ˆβ–ˆβ”€β–„

a micro mvc framework for php

micro-mvc-php a micro mvc framework for php Config your Web url in .env . lifecycle All request proccess by index.php Autoload files include in bootst

The Hive is a simple php mvc framework
The Hive is a simple php mvc framework

Hive framework The Hive is a simple php mvc framework . Information Features : -MVC design -PDO connection -OOP system -Twig template -Very Fast, simp

This repository include my own PHP MVC Framework

PHP OWN MVC FRAMEWORK Kendimi geliştirmek ve modern PHP Framework'lerinin işleyişini kavram amacıyla inşa ettiğim profesyonele yakın PHP MVC Framework

Minimal PHP MVC Framework that is eternally broken.

β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„ β–ˆβ–ˆ β–„β–„β–„ β–ˆ β–„β–„β–€β–ˆ β–„β–„β–ˆβ–ˆβ–„β–ˆβ–ˆ β–„β–€β–ˆβ–ˆβ–„β–ˆβ–ˆ β–„β–„β–€β–ˆ β–„β–„β–€ β–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆ β–„β–„β–€β–ˆβ–„β–„β–€β–ˆβ–ˆ β–„β–ˆ β–ˆ β–ˆβ–ˆ β–„β–ˆ β–€β–€ β–ˆ β–ˆβ–ˆ β–ˆβ–ˆ β–€β–€β–€ β–ˆβ–„β–„β–„β–„β–ˆβ–„β–„β–„β–ˆβ–„β–„β–„β–ˆβ–„β–„β–ˆβ–ˆβ–„β–„β–„β–ˆβ–„β–ˆβ–ˆβ–„β–ˆ

Releases(1.2)
  • 1.1(Nov 12, 2021)

    News:


    Added the Sonic component:

    Sonic lets you create Controller and Model files quickly via the terminal.

    • Just type php sonic in the terminal and send.
    • Then enter the name of the files you want to create.
    • Okay, your files are already created in the "Controllers" and "Models" folders._


    New method $this->do_login():

    This method allows you to check if the credentials are correct, returning TRUE or FALSE.


    To use, you will need to declare two arrays:

    $array_login = [
      "login" => "email"
    ];
    
    $array_password = [
      "password" => "password"
    ];
    

    Now you will need to declare a variable with the name of the table you want to query in the database:

    $table = "users";
    

    Okay, just run the function passing these 3 parameters, respectively:

    $this->do_login($array_login, $array_password, $table);
    


    New method $this->validate():

    This method checks if all inputs have been sent. If not, it displays an error message to the user.


    Declare an array with all the inputs you want to check:

    $inputs = [
      'email',
      'password',
      'permission'
    ];
    

    Now execute the function passing as first parameter the array you just created and as second parameter the type of request (GET or POST):

    $this->validate($inputs, 'post');
    


    New methods "$this->encrypt()" and "$this->decrypt()":

    This method allows you to encrypt and decrypt strings.


    First, go to the "app/config/config.php" file, search for "define('ENCRYPT_KEY')" and define a unique encryption key:

    define('ENCRYPT_KEY', 'qkwjdiw239&&jdafweihbrhnan&^%$ggdnawhd4njshjwuuO');
    

    Now you can encrypt, passing the string as a parameter:

    $encrypted = $this->encrypt($string);
    

    And decrypt using an encrypted string:

    $decrypted = $this->decrypt($encrypted);
    


    Bootstrap v5 already available natively:

    By default, this option is enabled in the framework and you can use Bootstrap resources (CSS and Script) in the "Views" files.

    Para desativar esta opção, basta ir no arquivo "app/config/config.php" e alterar:

    define('BOOTSTRAP', FALSE);
    
    Source code(tar.gz)
    Source code(zip)
Owner
null
FuelPHP v1.x is a simple, flexible, community driven PHP 5.3+ framework, based on the best ideas of other frameworks, with a fresh start! FuelPHP is fully PHP 7 compatible.

FuelPHP Version: 1.8.2 Website Release Documentation Release API browser Development branch Documentation Development branch API browser Support Forum

Fuel 1.5k Dec 28, 2022
I made my own simple php framework inspired from laravel framework.

Simple MVC About Since 2019, I started learning the php programming language and have worked on many projects using the php framework. Laravel is one

null 14 Aug 14, 2022
I made my own simple php framework inspired from laravel framework.

Simple MVC About Since 2019, I started learning the php programming language and have worked on many projects using the php framework. Laravel is one

Rizky Alamsyah 14 Aug 14, 2022
Ergonode is modern PIM platform based on Symfony and Vue.js frameworks.

Modern Product Information Management Platform Ergonode is modern PIM platform based on Symfony and Vue.js frameworks. It has modular structure and gi

Ergonode 100 Dec 19, 2022
This repository contains custom View classes for the template frameworks

Slim Views This repository contains custom View classes for the template frameworks listed below. You can use any of these custom View classes by eith

Slim Framework 308 Nov 7, 2022
Rori-PHP is custom non production web application framework inspired by Laravel syntax

Rori-PHP is custom non production web application framework inspired by Laravel syntax. A web framework provides a structure and starting point for your application allowing you to focus on creating something amazing.

UnknownRori 5 Jul 28, 2022
PHP REST API using CodeIgniter 3 framework and CRUD operations

PHP REST API using CodeIgniter 3 framework and CRUD operations ?? Hi there, this is a simple REST API built using the Codeigniter 3 framework. And thi

Hanoak 0 Oct 20, 2021
CodeIgniter - a PHP full-stack web framework that is light, fast, flexible and secure

CodeIgniter 4 Development What is CodeIgniter? CodeIgniter is a PHP full-stack web framework that is light, fast, flexible and secure. More informatio

CodeIgniter 4 web framework 4.5k Jan 4, 2023
Symprowire is a PHP MVC Framework based and built on Symfony, using the ProcessWire CMS as DBAL and Service Provider.

Symprowire - PHP MVC Framework for ProcessWire 3.x Symprowire is a PHP MVC Framework based and built on Symfony using ProcessWire 3.x as DBAL and Serv

Luis Mendez 7 Jan 16, 2022
FlyCubePHP is an MVC Web Framework developed in PHP and repeating the ideology and principles of building WEB applications, embedded in Ruby on Rails.

FlyCubePHP FlyCubePHP is an MVC Web Framework developed in PHP and repeating the ideology and principles of building WEB applications, embedded in Rub

Anton 1 Dec 21, 2021