4

In Laravel 5.5, the bootstrap/autoload.php file has been removed. This is where I would have defined a function that overwrites the typical Laravel helpers as in this thread.

How can I achieve the same in the 5.5 release? I tried a require at the top of the bootstrap/app.php file with no luck.

1
  • I would define my function in a class and bind that class with service container. and call specific method from AppServiceProvider using boot method. ro simply put your code inside boot method. Commented Nov 14, 2017 at 22:17

1 Answer 1

2

There is a package that can help https://github.com/funkjedi/composer-include-files

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

2 Comments

That gets me the cannot redeclare error. How did you make it work?
Updated the answer

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.