Our blog

Seeding – inside of the migration files

Laravel has quite a convenient mechanism of dealing with database changes. It consists of Migration files for database structure and Seed files for sample data. But why separate them if sometimes it make sense to add it all to one file?

Monday, September 14th, 2015

Override updated_at, or “hidden” save() parameters

Another interesting feature in Laravel Eloquent mechanism. When updating existing entry, we just use update() or save() and then updated_at field is changed automatically. But what if we want to stick our own updated_at instead of automatic one?

Tuesday, September 8th, 2015

How to check route parameters with regular expressions

I’m pretty sure that majority of you haven’t read ALL official Laravel documentation – you work only with functions you actually need and know, right? So I like to dig up some less known or “hidden” features which are new to many people. So today one of those “Did you know?” cases.

Sunday, September 6th, 2015

In Eloquent We Trust, or don’t assume find() always finds something

This short lesson will be both about Laravel and about general software development. One of the most often and common mistakes made by developers is not checking input data. And then not only you get random errors of something “not found”, but sometimes much worse – expose your system to vulnerabilities and attacks. So let’s discuss that with examples from Eloquent world.

Thursday, September 3rd, 2015

How to get rid of /home URL for authentication?

This time – a really short tip. In default Laravel Auth functionality there are some predefined values, settings and similar stuff – one of them is redirecting to /home URL after successful login, or if a user is already logged in. What if we don’t have that /home – what if in our case it’s different?

Wednesday, September 2nd, 2015

Auth Login: how to check more than just email/password?

Laravel default authentication is awesome. But by default it works by checking two fields – email and password. What if we have some additional fields to check? For example, if user is approved?

Tuesday, September 1st, 2015

Laravel 5.1.11 introduces ACL system

Another great news for Laravel community – more and more often repeated functions become a part of Laravel framework itself. Today a new addition is Authorization or ACL functionality.

Monday, August 31st, 2015

Eloquent: shorter WHERE clauses with whereField

There’s one really neat Laravel Eloquent function which, from my experience, a lot of developers don’t know. How do we write WHERE clauses on Eloquent queries?

Thursday, August 20th, 2015

Multiple database connections in the same Laravel project

Sometimes there is a situation where we have our main project database, but we need to take some external data from another database – for example, where blog is stored, managed by 3rd party software. How to handle it in Laravel 5?

Tuesday, August 18th, 2015