dimanche 25 octobre 2015

Function redeclaring error when using Drupal API in Laravel project

I've tried to bootstrap drupal API inside my laravel project by putting this code inside (public/index.php) file in laravel project directory :

 $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];
 define('DRUPAL_ROOT', $DOCUMENT_ROOT.'drupal738');
 require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
 drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

the bootstrap code is taken from drupal website :

http://ift.tt/1iaxnhg

but when i open the login page on my laravel project the following error appears :

Fatal error: Cannot redeclare url() (previously declared in C:\wamp\www\laravelTest\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php:566) in C:\wamp\www\drupal738\includes\common.inc on line 2333

and that's because there are some functions with the same names are both defined in laravel and drupal such url() and base_path() .

So is there any way to solve this without breaking any thing at laravel Or Drupal side ?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1Mk8BbR
via IFTTT

Aucun commentaire:

Enregistrer un commentaire