wilburpowery

Hire Me

Experience

86,350

39 Best Reply Awards

  • Member Since 2 Years Ago
  • 593 Lessons Completed
  • 0 Favorites

18th October, 2018

wilburpowery left a reply on Dom Dosen't Refresh, What Wrong ? • 1 hour ago

You need to accept the post as a parameter in the handlePostEvent() method.

handlePostEvent(post) {
    this.posts.push(post);
}

wilburpowery left a reply on Dom Dosen't Refresh, What Wrong ? • 1 hour ago

Can you remove the JSON.parse statement?

From the Vue Dev Tools I can see posts isn't an actual object but it's a JSON string.

try removing that and let's see if it works.

Also, you don't need to use the this keyword inside the<template> of a component.

wilburpowery left a reply on Dom Dosen't Refresh, What Wrong ? • 4 hours ago

Can you see the post being added to the posts object using the Vue Devs Tools?

wilburpowery left a reply on Dom Dosen't Refresh, What Wrong ? • 4 hours ago

Why are you using the global event approach when a simple $this->emit('posted', {data}) since it's a parent/child event.

So in theory you can update your code to something like this:

// you can update your newpost.vue component to emit the event this way
}).then((response)=>{
    this.$emit('posted',response.data)
})


// on the posts.vue component you can listen for the event this way

<NewPost v-if="newpost" :user_id="this.user_id" @posted(handlePostedEvent)></NewPost>

17th October, 2018

wilburpowery left a reply on Is There A Way To Validate Blade Syntax • 1 day ago

Can you try to run it through the Blade compiler and catch if any exceptions are thrown?

Never really tried something like this tbh ?

wilburpowery left a reply on AWS Deployed App - Viewing The Site? • 1 day ago

If you do a ping mydomain.com from a terminal do you get the same IP from your AWS console? Maybe the DNS hasn't propagated completely yet. You sometimes might have to wait up to 24 hours.

16th October, 2018

wilburpowery left a reply on Manually Trigger Email Verification Mail To New User In 5.7 • 2 days ago

Yeah. $request->user() returns the currently authenticated user.

Glad I could help :)

wilburpowery left a reply on Manually Trigger Email Verification Mail To New User In 5.7 • 2 days ago

The Illuminate\Auth\MustVerifyEmail trait has a sendEmailVerificationNotification method which you can use.

So you can have something like this:

$user->sendEmailVerificationNotification(); // $user is the newly created user.

12th October, 2018

wilburpowery left a reply on Admin Package • 6 days ago

Voyager is free!

Laravel Nova isn't free.

11th October, 2018

wilburpowery left a reply on Don't Install Illuminate/support V5.5.0|don't Install Laravel/framework V5.3.31 • 1 week ago

What version of Laravel are you using?

Seems like conflicting versions of the illuminate/support package is happening.

wilburpowery left a reply on Using Blade Directives Messes Up Final Code Indentation - Is This Normal? • 1 week ago

However the html looks in the browser doesn't affect your site or app in any way. Each browser parses html differently.

Once the code looks good in the editor, you're good.

Don't sweat it brother! Keep up the work.

wilburpowery left a reply on Admin Package • 1 week ago

Voyager uses Bootstrap 3.

If you're main app uses Bootstrap 4 I shouldn't be a problem either since you would not load any of your main app styles in the admin side anyways.

If you're up for it, maybe give Laravel Nova a try?

It's 99$ but totally worth it for me.

10th October, 2018

wilburpowery left a reply on File Attachment Module • 1 week ago

The Media Library by Spatie is pretty good for this.

https://github.com/spatie/laravel-medialibrary

wilburpowery left a reply on Validation Rule, Field Must Not Contain A Pipe | • 1 week ago

A custom validation rule?

https://laravel.com/docs/5.7/validation#custom-validation-rules

And then you can simply do a strpost check to find any | in the string passed in.

8th October, 2018

wilburpowery left a reply on Hitting 403 Page When Clicking Verify Link In Email Using New Laravel Verification (5.7) • 1 week ago

The Email verification feature in Laravel uses the new Signed Routes feature introduced in 5.7.

Maybe that could be an issue also? It would make sense since you're getting a Forbidden error, so maybe the signed route isn't being validated correctly?

I'm just guessing right now to be honest. : /

wilburpowery left a reply on Best Practice To Secure Laravel End Points • 1 week ago

Laravel comes out of the box with a lot of security features that protect you against the most common attacks like SQL Injection and Cross Site Request Forgery.

Laravel doesn't have this concept of plugins, you might be mistaking it with Wordpress or something similar.

wilburpowery left a reply on Anchor Tag Routing • 1 week ago

Create a route for each form?

Like:

Route::post('form-1', '[email protected]');
Route::post('form-2', '[email protected]');

And simply add each route to the action on the forms.

wilburpowery left a reply on Hitting 403 Page When Clicking Verify Link In Email Using New Laravel Verification (5.7) • 1 week ago

Haven't really faced anything similar, but I don't really use Heroku.

Might it be something particular to Heroku?

I use Laravel Forge and have email verification working on about 3 live apps right now.

3rd October, 2018

wilburpowery left a reply on Laravel Framework Version 5.6.38 - Code Review Using Static Analysers. • 2 weeks ago

The best version to start with is the latest one. 5.7.

These Static analyzers are super opinionated, I wouldn't sweat over those results.

I encourage you to take a look at the code behind Laravel and you'll see how beautiful and expressive it is.

2nd October, 2018

wilburpowery left a reply on Routes - Invocation Parameter Types Are Not Compatible With Declared • 2 weeks ago

Can you please format your code a little better?

I think it's simply an error in your code, but it's hard to see with how you pasted it right now.

wilburpowery left a reply on FCC Responsive Web Tribute Page • 2 weeks ago

Looks grat @James_Moore. Keep up the good work. It only get's easier.

As for your HTML, in codepen you don't need to have the basic html structure.

For example:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    
</body>
</html>

The above markup isn't needed in codepen. It adds it for you automatically.

You could get away with simply adding your html content:

<h1>My content</h1>
<p>my paragraph</p>

1st October, 2018

wilburpowery left a reply on Error In Make Controller • 2 weeks ago

You have something wrong in your routes file.

Before registering any routes in the file, you need to generate the controller first.

Maybe check you're not doing this?

30th September, 2018

wilburpowery left a reply on Call To Undefined Method Illuminate\Database\Query\Builder::makeAllSearchable() Laravel Scout Algolia • 2 weeks ago

Indeed. Glad I could help. Maybe mark as best answer in case anyone else finds this question?

wilburpowery left a reply on Realtime Frontend Blog Style Tag With Laravel • 2 weeks ago

For any realtime stuff, you should take a look at Laravel Echo https://laravel.com/docs/5.7/broadcasting#installing-laravel-echo

wilburpowery left a reply on Pay Forge With Paypal • 2 weeks ago

Not supported that I know of.

wilburpowery left a reply on Call To Undefined Method Illuminate\Database\Query\Builder::makeAllSearchable() Laravel Scout Algolia • 2 weeks ago

Are you using the Searchable trait in the rest of models?

use Laravel\Scout\Searchable;

25th September, 2018

wilburpowery left a reply on Sending Email Via Mailtrap Not Working And Not Error • 3 weeks ago

Nothing in the storage/logs/laravel.log file? If not, maybe you haven't added your Mailtrap credentials correctly in your .env file.

wilburpowery left a reply on Blade Null Coalesce Doesn't Work • 3 weeks ago

The or helper is been removed in 5.7.

You should use the Null Coalesce Operator: ??

So you'll be left with {{ $title ?? 'Default page title' }}

24th September, 2018

wilburpowery left a reply on Redirection, LoginController Vs RedirectIfAuthenticated • 3 weeks ago

If you want to redirect somewhere after you login to your application, the redirectTo property is the way to go.

The RedirectIfAuthenticated middleware is simply what's used when you assign a route the guest middleware. So If you visit a route that is only intended for guest users, like the login route, it will redirect you back to the home route.

20th September, 2018

wilburpowery left a reply on Reactjs & Laravel - Syntax Error, Whiile Combining React With Laravel. • 4 weeks ago

Please format the code properly. Can't event begin to understand it.

wilburpowery left a reply on CSS Grids For Everyone - Why It 'Tooling' Category? • 4 weeks ago

Does it really matter that much though?

wilburpowery left a reply on What About A Laravel 5.7 From Scratch Series? • 4 weeks ago

Jeff typically records this series in January. Patience is key!

wilburpowery left a reply on How To Add Logo For Email Notification Template • 4 weeks ago

Edit the file?

wilburpowery left a reply on How To Control User Dashboard • 4 weeks ago

You can always add some @if blade constraints in the templates.

Like:

@unless(auth()->user()->isOfficer())
    <li>Menu not visible to an office user</li>
@endunless

Also, you should do some validation on the backend using policies to prevent an office user to let's say visit a route to create a user.

https://laravel.com/docs/5.7/authorization#writing-policies

19th September, 2018

wilburpowery left a reply on Make:Auth • 4 weeks ago

Yep. What @Cronix said. You should know how you have your roles structured.

wilburpowery left a reply on Dynamic Form : Fields Are Not Filled When Validation Failed • 4 weeks ago

Do you mean backend validation?

wilburpowery left a reply on On Moving Laravel Projects From One PC To Other PC. It Gives Too Many Redirects. • 4 weeks ago

So it works on one PC but when moved to the other one it redirects to many times?

Or it redirects to many times on either PC?

wilburpowery left a reply on How Can I Display The Relation Data In Vue.js • 4 weeks ago

Is this with Laravel or vanilla PHP?

wilburpowery left a reply on Pros And Cons Of Laravel Dusk Vs. Ghostinspector.com • 4 weeks ago

Honestly I think Dusk is more developer focused/friendly. You have a lot more control over your testing, whereas using a service per say, you're limited to whatever they offer.

wilburpowery left a reply on Make:Auth • 4 weeks ago

Or, you can also override in your LoginController.php the +authenticated+ method which receives the $request and the $user.

protected function authenticated(Request $request, $user)
{
    if($user->isAdmin()) {
            return redirect('/admin-route');
        }

        return redirect('/home'); 
}

^ This is what I would do personally.

wilburpowery left a reply on Make:Auth • 4 weeks ago

in the login controller there's a protected $redirectTo property. But in your case you can delete that and create a function.

public function redirectTo()
{
    if($user->isAdmin()) {
        return '/admin-route';
    }

    return '/home'; 
}

18th September, 2018

wilburpowery left a reply on Put Multiples Fields In One Row • 1 month ago

If not, simply adding the input should work. Not sure I understand your question though.

wilburpowery left a reply on Put Multiples Fields In One Row • 1 month ago

Are you using a css framework like Bootstrap?

They have an form-inline class I think.

wilburpowery left a reply on How To Send Text (.txt) File As Attachment Without Storing On The Server In Laravel? • 1 month ago

That I'm not sure if it's possible. Or Maybe I just haven't tried it yet.

17th September, 2018

wilburpowery left a reply on Forge: Silently Failing To Create Mysql Databases And/or Users • 1 month ago

I think you can send an email to [email protected] and she should get back to you as soon as possible.

wilburpowery left a reply on How To Redirect To Admin Login Page On Logout • 1 month ago

@Lynk77 and nothing is showing up in your log file?

wilburpowery left a reply on How To Redirect To Admin Login Page On Logout • 1 month ago

You code seems fine to me.

Are you using different guards or something similar?

wilburpowery left a reply on How To Redirect To Admin Login Page On Logout • 1 month ago

dd will dump whatever you pass in and kill the execution. So auth()->logout(); return redirect()->intended('admin'); is never really executed.

Remove that first return?

wilburpowery left a reply on How To Send Text (.txt) File As Attachment Without Storing On The Server In Laravel? • 1 month ago

Checkout the raw attachments section in the docs.

https://laravel.com/docs/5.7/mail#attachments

You can use the attachData.

6th September, 2018

wilburpowery left a reply on What Theme/Color-Scheme Is Jeffery Way Using Laravel 5.7 • 1 month ago

He should include it in the description of every video haha! @JeffreyWay

Edit Your Profile
Update

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