Skip to content

Code PHP single page, similar to Laravel blade format by include only one file (Raku.phar).

Notifications You must be signed in to change notification settings

mlightvn/raku.phar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Donate

Apache config

<VirtualHost *:80>
    ServerName "raku.phar"
    DocumentRoot "/var/www/vhosts/raku/src/"
    ErrorLog logs/raku.error.log
    CustomLog logs/raku.access.log combined env=!no_log

    <Directory "/var/www/vhosts/raku/">
	DirectoryIndex index.php index.html
	Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

</VirtualHost>

How to use

Require

include_once("Raku.phar");

Declare class:

$raku = new Raku();

Common functions

Function Name Parametters Description
view($source_file_path, $data); $source_file_path: php file. Similar to blade file path in Laravel. $data: array of parametters (variables) for source file. Compile source file to compiled file, then display on screen.

Common attributes

Attribute Name Type Description
isClearCache boolean: false True: Clear cached/compiled files every reload. Use for developing. In production, should be false. And clear all cached files in storage/cache/ folder. $raku->setClearCache(true) or $raku->setClearCache(false)

Sample

Please look in src/ and view/ folder for sample source code.

Deploy to production

  • Deploy latest source code files.
  • Clear all cache in storage/cache/ folder

About

Code PHP single page, similar to Laravel blade format by include only one file (Raku.phar).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published