Download the PHP package shafiul-islam/nmvc without Composer

On this page you can find all versions of the php package shafiul-islam/nmvc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nmvc

NMVC

NMVC is a PHP base MVC framework

Installation

The NMVC can be installed with Composer.

Run Your Project

By using PHP Built-in web server you can run your project easily

you can change the port if you need

Directory Structure

The Basics

Routing

All route files are defined in app/routes directory

Web Routing

routes/web.php used for defines routes for application's interface.

here is a basic structure of web.php

the most basic routing is closure aproch. it has 2 arguments. route uri as a string and a closure.

this route will work as a index page. example: http://example.com/

for http://example.com/hello

Router class ($app->router) has 2 methods right now. GET, and POST.
POST route can be create by useing

route medthods also accept contoller as a callback argument. we can pass a array where 0 index will be the calss name, and 1 index will be the function name

also we can we can define a view directly

API Routing

coming soon

controller

base controller class

it will hold all you code and functions.

for routing functions take a request argument and must have a request method condition.

here $this->view('index',$data); render you view files. it takes 2 argument first one is you view file and second one is data that you are going to pass to your view file. view argument is basically a php file name inside a views directory without .php extension.
data argument is an associative array and for each value you will get a php variable inside you view. like if i pass

ill get hello key ass my variable$hello inside my view
inside data you can pass your page/view metadata also.

if you not set any metadata it will take all the info from config file as default .

NMVC CLI

NMVC ClI will make your development process much easier and faster. its a build in tool. you can crete controller,model, make migration by using cmd command.

run php nmvc


All versions of nmvc with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shafiul-islam/nmvc contains the following files

Loading the files please wait ....