Skip to content

Tag: laravel-5

laravel seeds unique column ignore duplicate entries

i have a Seeder in Laravel in this email is unique, when I run first time its entering records into the database, when I run again its showing duplicate entry. do i have option to ignore that.? Answer We have an option to check whether the given email exists in the table or not.

Laravel Auth Login Page Just Refreshes

I am using Laravel 5.4. I ran the make:auth command to scaffold out my auth controllers and views. I can register a new account without issue as it is showing up in my database. However when I try to login, the login page simply refreshes without any errors being thrown. In the login controller I have the red…

How to check user input in laravel

I have a column input named Address, and how to check, if user input like null, ‘null’ and ” , the return response will be error. I have make it, but it not working. This is my code: Answer You may use the empty function, which would return FALSE if var exists and has a non-empty, non-zero v…

Laravel 5.4 environment based config files

I am trying to change the Laravel configuration variables based on environment, but I do not know how. Code to get config is I am trying to have a separate results for the live environment and the development environment. Real life scenario I need to override some config files, so everybody who is using the d…