PHPackages                             thnguyendev/phpcore - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. thnguyendev/phpcore

ActiveProject[Framework](/categories/framework)

thnguyendev/phpcore
===================

The phpcore framework

3.0.0(5y ago)316MITPHP

Since Feb 7Pushed 4y agoCompare

[ Source](https://github.com/thnguyendev/phpcore)[ Packagist](https://packagist.org/packages/thnguyendev/phpcore)[ RSS](/packages/thnguyendev-phpcore/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (7)DependenciesVersions (7)Used By (0)

phpcore 3.0.0
=============

[](#phpcore-300)

phpcore is a tiny MVC framework to develop web-based applications in PHP. It's simple and easy to use.

Quick start
-----------

[](#quick-start)

1. Download and install Composer by the following url
2. Create phpcore project by Composer. Execute below commands ```
    > composer create-project thnguyendev/phpcore [project folder]
    > cd [project folder]

    ```
3. Configure web server
    - Apache server Modify .htaccess file of project as per following

    ```
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [QSA,NC,L]

    ```

    - Nginx server Insert following codes into your server configuration in nginx.conf

    ```
    location / {
        index  index.html index.htm index.php;
        if (!-e $request_filename) {
            rewrite ^(.*)$ /index.php?q=$1;
        }
    }

    ```
4. Create Routes \[project folder\]/src/server/models/Routes.php ```

    ```
5. Modify startup file \[project folder\]/src/server/Startup.php ```

    ```
6. Create HomeController \[project folder\]/src/server/controllers/HomeController.php ```

    ```
7. Create a view for HomeController \[project folder\]/src/server/views/Home.php ```
    >

        Phpcore

        message; ?>

    ```

Web API
-------

[](#web-api)

Steps to create a Web API with phpcore framework.

1. Follow steps 1 to 3 from Quick start to setup new project.
2. Create Routes \[project folder\]/src/server/models/Routes.php ```

    ```
3. Modify startup file \[project folder\]/src/server/Startup.php ```

    ```
4. Create an API controller \[project folder\]/src/server/controllers/api/GetInfoController.php ```
