Coder Social home page Coder Social logo

scriptcha-mvc's Introduction

Server Requirements

To run ScriptCha of your server, there is no special configuration however there something on the server level that needs to be taken care of in order for the framework to work flawlessly.

  • PHP 5.3 or greater
  • MySQL 5.6 or greater OR MariaDB 10.0 or greater
  • Nginx or Apache with mod_rewrite module

Installation

Really it's very straight forward.

  • Clone or download git repo
  • Unzip and upload to your server
  • Make changes in config.php with your details
  • That's it

Controller

All the controller classes will be saved in the director open pattern\controllers. To create a controller class, create a PHP file and name it WelcomeController.php and save it in pattern\controllers. Now open WelcomeController.php and write the following class.

class WelcomeController extends Controller{
    
}

Method

Within your WelcomeController.php class. We need to create a method called MyMethod. Let's open WelcomeController.php and the following method.

public function MyMethod(){
    
}

Model

Model are used in a way to interact with the database making the application modular and re-usable code. All models are saved in the directory pattern\requests. Create a file called Users.php and save it inside pattern\requests as Users.php. To call the model in your controller use the following helper function.

model( $model, $data );

Views

Views are stored in the pattern\views directory. Create a PHP file, let;s call it Welcome.php and save the file inside pattern\views, To include the file in method, we can use the following helper function:

view( $view, $data = array() );

Routes

You can register GET or POST. Open pattern/routes.php and add the following line of code.

Router::MyRequest('/MyURI', 'WelcomeController@MyMethod');

scriptcha-mvc's People

Contributors

navneil-naicker avatar

Watchers

James Cloos avatar  avatar

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.