suzano/spreng

Spring Framework Inspired for PHP Development Engine

v1.0.3-beta 2020-07-07 03:03 UTC

This package is auto-updated.

Last update: 2024-09-11 01:16:09 UTC


README

PHP Development engine inspired by JAVA's Spring Framework

Build Status Issues Forks Stars Release Licence

Requirements:

  • PHP 7.2
  • Apache 2.4.xx
  • Composer version 1.10.x
  • psr-4 compliant (your composer.json should look like this)
 {
   ...
   "require" : {
     "suzano/spreng" : "^1.0.0-beta"
   },
   "autoload" : {
     "psr-4" : {
       "AppName" : "folder/"
     }
   }
   ...
 }

Installation

Install dependency.

$ composer require suzano/spreng

Obs: Note that it will install also twig/twig, firebase/php-jwt and monolog/monolog as third-party.

Create a new file index.php in your root folder

<?php

use Spreng\MainApp;

require_once 'vendor/autoload.php';

MainApp::init();

Once you run localhost Spreng will create:

  • /.htaccess and /application.json config files.
  • /folder source folder.
  • /folder/MyFirstController.php sample ready to work. If everything went ok you should see the following message on your browser:

N|Init

After clicking refresh a Hello World page will be loaded.

N|Hello World