0

On a new Laravel 5 install on a mac, i received the following error after setting the virtual hosts and .env files

Fatal error: Call to undefined function database_path() in /Library/WebServer/Documents/laraveltest/config/database.php on line 51

The line 51 contains the following:

        'database' => env('DB_DATABASE', database_path('database.sqlite')),

changing it to

 'database' => 'dbname',

results in the following error

FatalErrorException in ProviderRepository.php line 150:
Class 'Collective\Html\HtmlServiceProvider' not found

any help is much appreciated

1 Answer 1

1

the database_path function is part of the base laravel, so if you installed it correctly it should work.

Collective\Html is an additionnal package published by the Laravel Collective.

Make sure your composer.json require the appropriate package:

 "laravelcollective/html": "~5.0"

also, make sure you have run composer update with the previous line in your composer.json

This command should make sure all dependencies are installed and hopefully it'll clear your issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.