HFH

Developer at Homes for Heroes

Experience

2,870

0 Best Reply Awards

  • Member Since 3 Years Ago
  • 96 Lessons Completed
  • 0 Favorites

1st December, 2017

HFH left a reply on L5.5 Form Validation: Exclude Password From User Info Update If Empty String • 1 week ago

Perfect @Snapey, thank you very much!

HFH started a new conversation Laravel 5.5 & Bootstrap 4 Pagination Issues • 1 week ago

I've seen a number of threads regarding the class changes in pagination from BS3 to BS4, but I can't seem to get to the bottom of it on my own app.

Using a simple pagination in my controller with:

$users = DB::table('users')->orderBy('created_at', 'desc')->simplePaginate(5);

And then rendering the pagination buttons as such:

{{ $users->render() }}

Gives me this: /Users/austintoddj/Desktop/Screen Shot 2017-12-01 at 1.32.55 PM.png

HFH started a new conversation L5.5 Form Validation: Exclude Password From User Info Update If Empty String • 1 week ago

Tried to be self-explanatory in the title.

Currently using Laravel 5.5

I have a basic user update form with the name, email, password and password confirmation present.

Here is the current validation and submission:

    // Validate the request data
        $this->validate($request, [
            'name' => 'required',
            'email' => 'unique:users,email,'.Auth::user()->id.'|required|email',
            'password' => 'nullable|string|min:6|confirmed'
        ]);

        // Update the user profile in the database
        Auth::user()->update($request->all());

    // This is where an integrity constraint violation gets thrown, because the database can't save a null password
        

The problem I run into is that I never want null to be passed to the database. Basically, if the user wants to only update their name/email and not their password, they can do so.

HFH left a reply on User Update Password Validation • 1 week ago

@Snapey If you use nullable though, are you telling the application that your password can be null and then when you do $user->update($request->all());, it'll run into integrity constraint violations?

22nd July, 2015

HFH left a reply on Moving Laravel To Production - Is It Possible? • 2 years ago

Any time I move a Laravel application to production, I run a composer update and a php artisan clear:cache.

composer update
php artisan cache:clear

HFH started a new conversation Sweet Alerts In Laravel 5 • 2 years ago

I noticed a while back that @jeffery_way started using Sweet Alerts here on Laracasts. I've recently included them into my project and really like them. However, I'm trying to have them display after a user logs in, and after a user logs out. I currently am using Laravel 5.1. Any help finding what routes/controllers I should modify would be greatly appreciated!

HFH left a reply on Moving Laravel To Production - Is It Possible? • 2 years ago

  1. I've run into the WSOD numerous times. Changing the permissions of Storage/ fixed that particular problem for me.
sudo chmod o+w -R Storage/
Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.