Month: April 2018

15 Awesome Laravel collection methods

15 Awesome Laravel collection methods

Laravel Eloquent uses Collections to return the results. Collections contains very useful methods that makes them very powerful and helpful to use. You can filter them, modify them and much more with them very conveniently. We will be looking at...

/ April 25, 2018
Laravel login with email or username

Laravel Auth: Login With Email Or Username In One Field

A quick great tip for you guys. Laravel default authentication allows you to login with an email only but we can also use some other field like username. Laravel by default only allows one field email for login but we...

/ April 14, 2018
Using underscore translation laravel

Laravel Underscores __() Function for localization based Translations

Laravel has a great helper function underscores (__) that we can use for JSON-based translations. Laravel 5.6 default authentication blade files also make use of underscore helper function. Like this: {{ __('Register') }} In previous versions of Laravel, we used...

/ April 12, 2018
PHP make migration parameters

make migration artisan command parameters in laravel

A quick little tip for guys who are new to Laravel. The artisan command make:migration accepts optional parameters -create and -table. These parameters allows you to change generate stubs created with the migration file. Let’s check out the differences. Simple...

/ April 9, 2018
Testing file uploads with Laravel

Testing File Uploads with Laravel

In this tutorial, we will see how we can test file uploads with laravel. We will create a very simple form to upload the file. Furthermore, we will test file uploads using laravel. Create a new View Let’s start by...

/ April 4, 2018