2017 © Pedro Pelรกez
 

library flight-skeleton

Simple Flight Framework skeleton application with Twig & Monolog & Eloquent ORM

image

andrey900/flight-skeleton

Simple Flight Framework skeleton application with Twig & Monolog & Eloquent ORM

  • Thursday, November 23, 2017
  • by andrey900
  • Repository
  • 1 Watchers
  • 13 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Flight Skeleton

Simple Flight micro Framework skeleton application with Twig & Monolog & Eloquent ORM. This package is suitable for any web hosting with php version higher 5.3. Use this skeleton application to quickly setup and start working on a new application. This application does not use latest version libraries: Monolog, Eloquent ORM - since the more recent versions use a higher php version., (*1)

Menu

Installation use composer

    $ composer create-project andrey900/flight-skeleton path/to/install

Composer will create a new Flight Skeleton project under the path/to/install directory., (*2)

Installation use git

    $ git clone andrey900/Flight-Skeleton path/to/install

Git will create a new Flight Skeleton project under the path/to/install directory., (*3)

Installation of the unix console (not realization)

    $ mkdir path/to/install && cd path/to/install
    $ wget -c https://github.com/andrey900/Flight-Skeleton/archive/master.zip -O FlightSkeleton.zip
    $ unzip FlightSkeleton.zip && rm FlightSkeleton.zip

Installation use browser

Download the zip archive use link, or use button "Clone or download -> Download zip". Uncompressed archive in you hosting or local directory., (*4)

Remember: The string "path/to/install" should be replaced by your folder path., (*5)

First start

Open file src/bootstrap/config.php for edit, and enter the correct data for your connection db. More info for config file link, (*6)

Copy files to you root webserver folder. Open browser input you host. Local start use php in unix:, (*7)

    $ cd path/to/install
    $ php -S 127.0.0.1:8080

After open browser use link: http://localhost:8080, (*8)

Folder structure

.
โ”œโ”€โ”€ .git                # git repository folder
โ”œโ”€โ”€ cache               # Cache folder
โ”‚   โ””โ”€โ”€ ...             # Cache type, etc
โ”œโ”€โ”€ log                 # Logs files
โ”œโ”€โ”€ src                 # Folder for you application source code
โ”‚   โ”œโ”€โ”€ App             # You namespace for library and classes
โ”‚   โ”‚   โ””โ”€โ”€ ...         # Make you structure, etc
โ”‚   โ”œโ”€โ”€ bootstrap       # Files using for starting application
โ”‚   โ”œโ”€โ”€ Controllers     # Controllers for you application
โ”‚   โ””โ”€โ”€ Models          # Model for you application
โ”œโ”€โ”€ templates           # Templates use in you application
โ”‚   โ”œโ”€โ”€ main            # Holds name for template, use for many templates and easy substitution
โ”‚   โ””โ”€โ”€ ...             # Make you template, etc
โ”œโ”€โ”€ uploads             # Static files
โ”œโ”€โ”€ ...                 # Make you folder, etc

Files structure

.
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ App
โ”‚   โ”‚   โ”œโ”€โ”€ Routes                  # Example: Routes namespace
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ RouteGenerator.php  # Example: Make array for config, and init this routers
โ”‚   โ”‚   โ””โ”€โ”€ Utils.php               # Example: Class for utilities
โ”‚   โ”œโ”€โ”€ bootstrap
โ”‚   โ”‚   โ”œโ”€โ”€ config.php              # Config array for you application: @return array
โ”‚   โ”‚   โ”œโ”€โ”€ dependencies.php        # Init dependencies and class in Flight
โ”‚   โ”‚   โ”œโ”€โ”€ routes.php              # Init routes in Flight
โ”‚   โ”‚   โ””โ”€โ”€ start.php               # Boot file for you application
โ”‚   โ”œโ”€โ”€ Controllers
โ”‚   โ”‚   โ”œโ”€โ”€ FrontController.php     # Example: Base controller and logic for front-end
โ”‚   โ”‚   โ””โ”€โ”€ PageController.php      # Example: Specific controller for type page
โ”‚   โ””โ”€โ”€ Models
โ”‚       โ””โ”€โ”€ Pages.php               # Example: Page model for sql table "pages"
โ””โ”€โ”€ templates
    โ””โ”€โ”€ main                        # Example: template
         โ”œโ”€โ”€ base.twig              # Base template layout
         โ”œโ”€โ”€ home.twig              # Home template
         โ”œโ”€โ”€ pageLists.twig         # List pages template
         โ”œโ”€โ”€ pageDetail.twig        # Detail page template
         โ””โ”€โ”€ 404.twig               # 404 error - page not found template

Config example

Structure file config - multidimensional array. This file must return always array for correctly functioning your application!, (*9)

First level - key for config library Second level - array - with a convenient structure for use, most often used key-value, (*10)

Example:, (*11)

    return array(
        ...
        "you_key" => array(
            "you_first_key"  => "value1",
            "you_second_key" => "value2",
        ),
    );

Install example site and db structure

Follow for link: /install-example/ and click button "Install"., (*12)

Remember: You must first start and correctly configure a database connection., (*13)

More information can be found in the documentation of individual system modules: - Flight - Twig - Illuminate ORM - Monolog, (*14)

The Versions

23/11 2017

dev-sideci_demo_1511455553

dev-sideci_demo_1511455553 https://github.com/andrey900/flight-skeleton

Simple Flight Framework skeleton application with Twig & Monolog & Eloquent ORM

  Sources   Download

MIT

The Requires

 

skeleton mvc fast flight php-5.3 psr-4

06/12 2016

dev-master

9999999-dev https://github.com/andrey900/flight-skeleton

Simple Flight Framework skeleton application with Twig & Monolog & Eloquent ORM

  Sources   Download

MIT

The Requires

 

skeleton mvc fast flight php-5.3 psr-4

16/08 2016

dev-composer

dev-composer https://github.com/andrey900/flight-skeleton

Simple Flight Framework skeleton application with Twig & Monolog & Eloquent ORM

  Sources   Download

MIT

The Requires

 

skeleton mvc fast flight php-5.3 psr-4