I've unexpectedly encountered a situation which might be useful to someone deploying projects. When it's time to move projects from local environment to production (or staging) server, a lot of weird things might happen there. One of them is a parse error in public/index.php file.
Quite often the logic of our applications rely on the current time. For example, if it's weekend, or if it's past midday or something. We usually use Carbon::now() to check the time - but what if it's morning now, and we need to test if it's 5 PM already? Do we really need to wait till evening to test the function? No. Carbon has a trick for that.
As you may have noticed, last week our small team released a package called QuickAdmin - an adminpanel builder for a quick start. For me it was the first public open-source release of a package, so it was a really interesting experience. And I want to share some thoughts - hopefully it would help those who plan to release something similar.
This is a really really short one. I just needed to generate a random password for a user and noticed that Google doesn't really give a one-line answer, which is really simple.
Today I want to share with you my own presentation made in my home city Vilnius (for those who don't know - it's a capital of Lithuania, Baltic States, here's a map) where we organised a local Laravel community meetup.
Today I want to briefly overview one package Laravel-Excel. I probably don't need to explain its purpose - the title says everything. But what I do want to show you is how easy it is to export data to Excel using Eloquent.
Laravel Eloquent is awesome - probably I don't need to tell you that. What is less known is the list of methods to work with Eloquent Collections. You can filter them, slice them, easily modify etc. But let's look at it one by one.
Laravel 5 version got us confused by separating our beloved Form::open world into a separate package. Now you have to add "illuminate/html": "~5.0" to your projects, whenever you want to use forms, right? Not necessary, you can survive without it.
Another quick tip and thing to watch out for. When processing form data, how do you check if the field is not empty? With $request->has('field'), right? But what about uploaded files?