mikaelmattsson / blade

Blade for Wordpress
GNU General Public License v2.0
151 stars 21 forks source link

Blade in WordPress #15

Closed prabhuchelladurai closed 10 years ago

prabhuchelladurai commented 10 years ago

How to implement in wordpress? i have created a plugin Cities in which we will have the details about any city we add to it. it was generated with WP MVC and its working properly. Now i need to implement blade in wordpress.

i have installed blade plugin in wordpress and have activated it. i have renamed some files to .blade.php say for ex. add.blade.php. when i happen to execute this particular file, it gives a warning message followed by an error message and the action is not done.

[MVC] Warning: View "admin/add" not found. Thrown on line 204 of /var/www/html/wordpress/wp-content/plugins/wp-mvc/core/controllers/mvc_controller.php

( ! ) Warning: require(): Filename cannot be empty in /var/www/html/wordpress/wp-content/plugins/wp-mvc/core/controllers/mvc_controller.php on line 265

( ! ) Fatal error: require(): Failed opening required '' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/wordpress/wp-content/plugins/wp-mvc/core/controllers/mvc_controller.php on line 265

Could you please help me in this regard?

mikaelmattsson commented 10 years ago

The plugin only works on theme files (with .php as the extenstion, not .blade.php). I am not familiar with WP MVC, but if you have view-files in a plugin it will not be parsed by blade.

prabhuchelladurai commented 10 years ago

Thanks Mike...