Most of the times when it comes to web application development, we as a developer need to either check or validate uploaded file from user. This routine is a great practice, to prevent user from uploading malicious file. Luckily on Laravel, this could be done in easy way.
Sometimes when developing web application, we need to allow users to upload some files. It could be avatar image, introductory video, etc. The first issue we'll encounter with default Nginx and PHP installation is related with upload file size. To encounter this issue, we need to adjust the maximum value parameter for both Nginx and PHP.
Most of the time when we want to display a dropdown or list all records on database, we need to order the column in same condition throughout the application. Calling
orderBy everytime we need to display the data could be avoided using Global Scope.
When it comes to API development, my weapon of choice for testing my code is Postman. I start using Postman since it's still a Chrome App. Now it encourages its user to use Postman Native app. I definitely love the idea, but all I can find is a download link without any installation document for Linux Mint.
Laravel's events provides a simple observer implementation, allowing you to subscribe and listen for various events that occur in your application. Events serve as a great way to decouple various aspects of your application, since a single event can have multiple listeners that do not depend on each other. So, we'll use Laravel Events to log each user's login information.