英文:
How to add more quotations in Laravel Inspire class?
问题
如何在Laravel Inspire类中添加更多的引用?由于这个文件位于vendor文件夹中,而这个文件夹不会直接上传到生产环境。
我在互联网上尝试过。我正在寻找一个可以在生产环境中使用的答案。
英文:
How to add more quotations in Laravel Inspire class? As this file comes inside vendor folder and this folder is not beind uploaded directly on production.
I tried over the internet. I looking for an answer which is production ready.
答案1
得分: 0
1-将供应商中的启发类复制到应用程序文件夹的任何位置,并添加您喜欢的引号。
2-相应地更改命名空间。
3-在routes/console.php文件中添加:use App\XXX\Inspiring;(用正确的路径替换XXX),并删除use Illuminate\Foundation\Inspiring;
运行该命令,它应该能够工作。
另一种方法是扩展原始类。
英文:
1-copy the inspiring class in the vendor anywhere in the app folder and add the quotes you prefer.
2-change the namespace accordingly
3-in the routes/console.php file add: use App\XXX\Inspiring; (replace XXX with the correct path) and delete use Illuminate\Foundation\Inspiring;
run the command and it should work.
another approach could be to extend the original class.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论