2017 © Pedro Peláez
 

project modulusphp

A lightweight PHP Framework

image

modulusphp/modulusphp

A lightweight PHP Framework

  • Thursday, June 28, 2018
  • by Donaldp
  • Repository
  • 4 Watchers
  • 8 Stars
  • 33 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 154 % Grown

The README.md

modulusPHP

Getting Starterd

Create a new modulusPHP application

To create a new modulusPHP application, we need to run the following command., (*1)

composer create-project modulusphp/modulusphp <app-name>

<app-name> is the name of your application. e.g. blog, (*2)

I assume, you already have composer installed, if not. Check out this link https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-16-04, (*3)

Setting up the environment

Rename .env.example to .env, (*4)

# Application
APP_NAME=modulusPHP
APP_ENV=local
APP_DEBUG=true
APP_URL=http://localhost
APP_ROOT=/public

# Database
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=modulusphp
DB_USERNAME=root
DB_PASSWORD=secret

# Mail
MAIL_USERNAME=example@domain.com
MAIL_PASSWORD=secret
MAIL_FROM_NAME=foo
MAIL_HOST=smtp.domain.com
MAIL_PORT=465 # or 587
MAIL_SMTP_SECURE=ssl # or tls

# C Modulus
C_MODULUS_ENABLE=false

Make sure, you have set the "DB_DATABASE", "DB_USERNAME" and the "DB_PASSWORD"., (*5)

Getting the application ready

Node.js NPM

Make sure you have nodejs and npm installed then install the dependencies using npm install., (*6)

If you don't have node.js, follow this tutorial: https://www.taniarascia.com/how-to-install-and-use-node-js-and-npm-mac-and-windows/, (*7)

Migrations

This part is optional (but recommended). The following command will create a users table. (You will be able to edit the table later if you want to make any changes)., (*8)

php modulus migrate

This will create a users, password_resets and migrations table, (*9)

Running the application

Run the following command to boot up your Application., (*10)

php modulus serve

If port 8000 is already in use, just set your own port. e.g, (*11)

php modulus serve 8001

You can now visit your Application on http://localhost:<port>, (*12)

Using C% in modulusPHP

C% (pronounced see modulus) is a new free object-oriented programming language that has a Swift-style syntax and trans-compiles into JavaScript. Before you can use C% in modulusPHP, you need to enable it in the .env file., (*13)

C_MODULUS_ENABLE=true

Here's how you can write C% Code in modulusPHP., (*14)

% // Code stored in resources/views/welcome.modulus.php %

{% extend('cmod.main') %}

% // Code stored in resources/views/cmod/main.modulus.php %

<@cmodulus

func greet(name) {
  println 'Hello ' + name;

  if name == "Donald" {
    echo name + ' is the creator of C% and modulusPHP';
  }
}

greet('Donald');

@>

{tip} Use the seshaUI.web library, (*15)

That's all!, (*16)

Author: Donald Pakkies, (*17)

The Versions

28/06 2018

dev-master

9999999-dev

A lightweight PHP Framework

  Sources   Download

MIT

The Requires

 

by Donald Pakkies

framework modulusphp

28/06 2018

1.3.04

1.3.04.0

A lightweight PHP Framework

  Sources   Download

MIT

The Requires

 

by Donald Pakkies

framework modulusphp

28/06 2018

dev-dev

dev-dev

A lightweight PHP Framework

  Sources   Download

MIT

The Requires

 

by Donald Pakkies

framework modulusphp

25/06 2018

1.3.03

1.3.03.0

A lightweight PHP Framework

  Sources   Download

MIT

The Requires

 

by Donald Pakkies

framework modulusphp

18/06 2018

1.3.02

1.3.02.0

A lightweight PHP Framework

  Sources   Download

MIT

The Requires

 

by Donald Pakkies

framework modulusphp

17/06 2018

1.3.01

1.3.01.0

A lightweight PHP Framework

  Sources   Download

MIT

The Requires

 

by Donald Pakkies

framework modulusphp

15/06 2018

1.3

1.3.0.0

A lightweight PHP Framework

  Sources   Download

MIT

The Requires

 

by Donald Pakkies

framework modulusphp

15/06 2018

1.2

1.2.0.0

A lightweight PHP Framework

  Sources   Download

MIT

The Requires

 

by Donald Pakkies

framework modulusphp