baijunyao / laravel-bjyblog

Laravel v9 blog
https://baijunyao.com/docs/laravel-bjyblog
MIT License
525 stars 201 forks source link

An error occurred after deleting the article #78

Closed yuri25 closed 5 years ago

yuri25 commented 5 years ago

An error occurred after deleting the article http://xtty.ru/admin/article/forceDelete/2

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Class 'AlgoliaSearch\Version' not found

The record is erroneous, please close it.

yuri25 commented 5 years ago

Although I'm not sure ... such an error appeared when publishing the article:

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Class 'AlgoliaSearch\Version' not found

yuri25 commented 5 years ago

All the same, there is a mistake.
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Class 'AlgoliaSearch\Version' not found Points to this place....

public function createAlgoliaDriver() { AlgoliaUserAgent::addSuffixUserAgentSegment('Laravel Scout', '3.0.10');

    return new AlgoliaEngine(new Algolia(
        config('scout.algolia.id'), config('scout.algolia.secret')
    ));
}
  1. "Class 'AlgoliaSearch\Version' not found"
baijunyao commented 5 years ago

What is the value of SCOUT_DRIVER in your .env file?
Have you deleted the SCOUT_DRIVER or changed the value of SCOUT_DRIVER to algolia?
Changing the value of SCOUT_DRIVER to null will solve this error; https://github.com/baijunyao/laravel-bjyblog/blob/v5.8.11.0/.env.example#L36

yuri25 commented 5 years ago

There were problems associated with the change of hosting. I had all the default settings SCOUT_DRIVER = null I am sorry. Please close this issue.

baijunyao commented 5 years ago

It's ok.