I used to specify the app version inside
composer.json
until I read somewhere here in Stack Overflow that it was a bad practice. What is the standard file to specifying the app version on a PHP Laravel application? (i.e: in .NET that'd be the config file, on iOS it'd be the info.plist, on Android it'd be the Manifest, etc...)Christopher FranciscoChristopher Francisco
4 Answers
config/app.php
is definitely the place for such information.Why ? Because the configuration files are (or should be) included in your versioning flow and they (should) contain non-sensitive information about your application. The perfect place for a simple version indicator.
Build A Laravel App With TDD, a training course on how to build a website that is Laracasts Laravel way you teach test-driven development. Laravel is one of the most popular PHP frameworks for developing web applications based on MVC architecture is used. Let’s Build A Forum with Laravel and TDD A forum is a deceptively complex thing. Sure, it’s made up of threads and replies, but what else might exist as part of a forum?
under the
name
index of the array, you could set a version
index like thisGeorge DimitriadisGeorge Dimitriadis
I normally set it in my .env file and then pick that up in a config.
e.g. .env says:
config/app.php says:
delatbabeldelatbabel
Good answers so far but whenever you run 'composer update', your version may change requiring you to update your .env or config.app file (or wherever you specified the version) each time to maintain correct versioning.
There is another alternative using blade (if you use blade). Add the following example code anywhere you want (in a .php file), and the version will automatically be updated whenever composer updates the version:
JohnJohn
@delatbabel
has a great start for version
config/app.php
for config/bugsnag:
than you can simply get your version with:
Docker
now in docker you could set a default version on build:
for example with circle CI you can add your build number:
Now in your config.yml, you can add following job commando:
Joel HarkesJoel Harkes
Not the answer you're looking for? Browse other questions tagged phplaravellaravel-5 or ask your own question.
Have you been looking for an advanced laravel course ?
Have you been searching for a course that will teach you the advanced core features of the LARAVEL framework?
Have you wondered how to build and deploy a REAL WORLD APPLICATION ?
Have you searched for a tutorial to learn the advanced concepts of LARAVEL and VUEJS ? the best PHP framework and the best FRONTEND JAVASCRIPT FRAMEWORK ?
Well, I've got good news for you. Search no more.
I introduce to you, THE ULTIMATE ADVANCED LARAVEL PRO COURSE.
The LAST LARAVEL COURSE you will ever need. This course covers advanced features of the laravel framework, with a deep dive into the source code of the framework, explanation of the core concepts and design patterns in the framework itself.
Some of the advanced features covered in this course in full detail are:
- Implicit and explicit Route model binding
- Feature and unit testing
- Advanced test driven development techniques
- Mailing
- Laravel Queue system
- Deployment of Laravel projects
- Advanced database queries
- Deep dive into Redis database management and usage
- Testing Redis database
- Extending and customizing Laravel
- Advanced features of laravel collections
- Extending laravel blade engine
- Custom exception handling in laravel applications
- Custom middleware files and groups
- Email verification systems
And so much more !!!
We would also learn how to build laravel applications with a vuejs frontend, and some of the features and concepts we would cover in Vuejs are :
- Advanced understanding and usage of the vue instance
- Declarative and conditional rendering
- Vue parent and child components communication
- Event buses and event handlers
- Exception handling and asynchronous vuejs
- Sweet alert integration
- Class and style bindings
- Data driven DOM manipulation and updates
- JavaScript core data manipulation techniques
- Communication and state management with Laravel backend
And so so so much more !!!
My name is Kati Frantz, and I am the creator of the best and highest rated Laravel course here on udemy for complete beginners, and I am famously known for my complete project based approach of teaching.
We would be building a complete SAAS application from scratch to deployment. This application would be a clone to the popular Laracasts site, and as time goes on , we would continue to extend and add new features to this application.
So come along with me on this journey to becoming a professional Laravel developer, building world class applications. Thank you so much, and see you in the course.
- Anyone who wants to become an advanced laravel expert developer
- Anyone who wants to learn test driven development with laravel
- Anyone who wants to build a professional advanced saas application in laravel
- Anyone who wants to learn how to deploy and manage laravel applications in production
- Anyone who wants to learn how to build advanced vuejs applications with a laravel backend
- Anyone with the desire to become an advanced laravel developer
- Beginner and intermediate laravel developers who want to become professionals at building laravel applications
- Beginner and intermediate vuejs developers who want to become professionals at building vuejs applications