2016-09-11 2 views
0

내 프로젝트에는 Syllable 패키지가 필요합니다.패키지를 Laravel 5.3에 추가하십시오. 오토로더가 작동하지 않습니다.

composer.json에서 작성자와 함께 설치하고 자동로드 할 클래스를 만들지 만 오류가 발생합니다.

$ composer require vanderlee/syllable 

편집 composer.json

"autoload": { 
     "classmap": [ 
      "database", 
      "vendor/vanderlee/syllable/classes" 
     ], 

덤프 자동로드

$ composer dump-autoload 

지금 어설프게

php artisan tinker 
>>> namespace Abkrim\Setdart; 
=> null 
>>> 
>>> $syllable = new \Syllable('en-us'); 
=> Syllable {#670} 
>>> echo $syllable->hyphenateText('Provide a plethora of paragraphs'); 
PHP warning: file_put_contents(/home/vagrant/setdart/vendor/vanderlee/syllable/classes/../cache/syllable.en-us.json): failed to open stream: No such file or directory in /home/vagrant/setdart/vendor/vanderlee/syllable/classes/Syllable_Cache_FileAbstract.php on line 43 
>>> 

으로 시도 내가 어떤 가파른가 잘못 것을 알고있다. 어느 쪽?

답변

0

Faced same error : 음절의 캐시 폴더에 올바른 경로를 설정하기 만하면됩니다. 문서에서

: 음절 캐시 파일을 저장할 수있는 setPath와

// Set the directory where Syllable can store cache files 
$syllable->getCache()->setPath(__DIR__ . '/cache'); 

()는 당신의 laravel 응용 프로그램에서 기존 폴더를 설정합니다.

관련 문제