Skip to content

It's a php transpiler for converting ordinary php view files to laravel blade

License

Notifications You must be signed in to change notification settings

smarteist/PHP2Blade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP To Blade Transpiler

PHP2Blade is a php transpiler for converting ordinary php view files to laravel blade template engine files.

Installation

git clone https://github.com/smarteist/PHP2Blade.git

Then run:

composer install

Usage

By default you only need to pass directory of your files to the transpiler, your output files will be saved in /out directory in the same project.

php php2blade <files directory> <optional output directory>

To remove comments we can add --removecomments switch

php php2blade --removecomments <files directory> <optional output directory>

To prevent comments conversion add --keepcomments

php php2blade --keepcomments <src directory> <-optional- output directory>

Output Examples

Some production ready outputs converted by PHP2Blade:

Conversion one

Conversion two

Conversion three

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

It's a php transpiler for converting ordinary php view files to laravel blade

Resources

License

Stars

Watchers

Forks

Packages

No packages published