laravel-5.1
Manually inject model relation using Eloquent
setRelation() should work. It sets the value in the relations array. $owner->setRelation(‘domain’, $domain); When setting a one to many relationship, you may need to use values(): $owner->setRelation(‘domains’, $domains->values());
Laravel commands and jobs
Console Commands Laravel has had console “commands” for some time. They are basically unchanged, and work as they always have. In simple terms, they are the equivalent of routes for the command line – the entry point into the application. They are in no way related to… The Command Bus Laravel 5.0 introduced an implementation … Read more
How to protect image from public view in Laravel 5?
It is possible to protect images from public view in Laravel 5.x folder. Create images folder under storage folder (I have chosen storage folder because it has write permission already that I can use when I upload images to it) in Laravel like storage/app/images. Move the images you want to protect from public folder to … Read more