Installation

Please install Windwalker Framework first. See Windwalker Installation

Then add "windwalker/phoenix": "~1.0" to require block and run composer update.

Prepare Phoenix Package

Add Phoenix package object to Windwalker/Windwalker::loadPackages().

// src/Windwalker/Windwalker.php

class Windwalker extends \Windwalker\Core\Windwalker
{
    public static function loadPackages()
    {
        return array(
            'system' => new SystemPackage,
            'phoenix' => new \Phoenix\PhoenixPackage // Add this line
        );
    }

    // ...

Link assets files:

This command will make a symlink to Phoenix assets in www/media

php bin/console phoenix asset sync phoenix

If you are in Windows, you must open cmd.exe or powershell.exe with administrator access to run this command. Or you can also use hard copy:

php bin/console asset sync phoenix --hard

Generate A New Package

Please make sure you have correct database configuration, then please type:

$ php bin/console muse init flower sakura.sakuras -sm

And you will see this result:

img

Package flower has been auto generated. We must register this package too, add it in src/Windwalker.php:

// src/Windwalker/Windwalker.php

class Windwalker extends \Windwalker\Core\Windwalker
{
    public static function loadPackages()
    {
        return array(
            'system' => new SystemPackage,
            'phoenix' => new \Phoenix\PhoenixPackage,
            'flower' => new \Flower\FlowerPackage  // Add this line
        );
    }

    // ...

Then create symlink to assets of this package:

php bin/console asset sync flower [--hard]

Direct sub routing to package routing at etc/routing.yml:

# etc/routing.yml

#...

# Add this route
flower:
    pattern: /flower
    package: flower

OK, now we can open http://localhost/{your_project}/www/flower/sakuras in browser, you will see a sample admin UI.

img

Use PHP built-in server:

cd {your_project}/www
php -S localhost:8000

Now you can use http://localhost:8000/flower/sakuras to test your application.

Debug Mode

Add /dev.php before your URL, Windwalker will start debug mode and provides a powerful debug console.

http://localhost:8000/dev.php/flower.sakuras

img


Found a typo? Help us improve this document.

This document is for Windwalker Joomla RAD, if you are finding Windwalker PHP framework, please see: Windwalker Framework