topvillas

Experience

171,785

199 Best Reply Awards

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

22nd May, 2018

topvillas left a reply on Not Able To Create Controller With Command Line? • 1 day ago

Change your path to point to the version of PHP you want.

topvillas left a reply on Do We Really Need To Use Eloquent? • 1 day ago

Nope, it's fine to use either or both. Whatever you're most comfortable with.

19th May, 2018

topvillas left a reply on Free Plan In Spark Without Requiring A Credit Card • 4 days ago

Couldn't you just set the free trial days to some huge number?

https://spark.laravel.com/docs/6.0/billing#no-credit-card-up-front

topvillas started a new conversation We All Love Vue. But ... • 4 days ago

Svelte looks VERY interesting ...

https://svelte.technology/

Frameworkless components are possible with a bit of effort but what about frameworkless components with no effort?

The philosophy looks pretty sound to me.

topvillas left a reply on How To Perform Client Side Validation In Laravel? • 4 days ago

Stop asking the same question.

You can't do it in Laravel. Laravel is a server side PHP framework.

What javascript framework are you using?

topvillas left a reply on @component Is Not Rendering • 4 days ago

Which version of Laravel are you using?

18th May, 2018

topvillas left a reply on How To Perform Client Side Validation In Laravel? • 5 days ago

There's dozens and dozens of client side validation libraries for any client side framework you might be using.

topvillas left a reply on Call Girls Delhi • 5 days ago

<_<

topvillas left a reply on Property Finder Web • 5 days ago

Ok.

topvillas left a reply on Is There A Way To Make The Helper Function Str_random Return Only Letters From A-z And Not Include Numbers? • 5 days ago

Don't muck about manipulating the string after the fact. Write your own function. It should take you about ten minutes.

17th May, 2018

topvillas left a reply on SQL To Laravel • 6 days ago

Is there a question?

16th May, 2018

topvillas left a reply on Why Bootstrap 4? • 1 week ago

Why do you think you DO need to use Bootstrap 4?

topvillas left a reply on Why Bootstrap 4? • 1 week ago

You don't.

15th May, 2018

topvillas left a reply on CI Testing To Includepersonal Package? • 1 week ago

Add it to the testsuites node in phpunit.xml

topvillas left a reply on Messages For Communicating Between Microservices Using Laravel • 1 week ago

Well, in that case you might want to look at this ...

https://github.com/vyuldashev/laravel-queue-rabbitmq

14th May, 2018

topvillas left a reply on Messages For Communicating Between Microservices Using Laravel • 1 week ago

Is there a reason you can't just use HTTP and JSON?

A lot of the stuff you read about microservices leads down the path of thinking you need to operate at Netflix or Google scale.

topvillas left a reply on Can I Create My Own Laravel Scaffolding Template? • 1 week ago

Yeah, get a git repository and clone it.

topvillas left a reply on Create Api Key Per/person • 1 week ago

You're talking about JWT. That's a different thing that does indeed store the user's identity.

An API token just identifies who's making the request to the API.

If you want to use JWT then by far the most popular package is this ...

https://github.com/tymondesigns/jwt-auth

13th May, 2018

topvillas left a reply on Create Api Key Per/person • 1 week ago

str_random(x)

12th May, 2018

topvillas left a reply on What Folder Should I Use To Extend The PasswordBroker Class Which Is In The Laravel\vendor Folder? • 1 week ago

Wherever you like, but I'd recommend you put it somewhere in the app folder. To avoid mucking about with composer autoloading.

topvillas left a reply on Nothing To Migrate • 1 week ago

Are you using Forge to deploy your site?

I haven't used it in a while but part of the deployment used to be to run your migrations for you.

10th May, 2018

topvillas left a reply on How To Make A Persistent Navbar In Vue Using Laravel Backend • 1 week ago

No, but pjax is another option.

9th May, 2018

topvillas left a reply on SQLSTATE[42S02]: Base Table Or View Not Found After Renaming A Table • 2 weeks ago

If the model class is named EventTypes, Eloquent will snake case based on capitalisation.

topvillas left a reply on Calling Controller Method From Many Pages • 2 weeks ago

return back()->with('message','Success! The new staff has been added to the system.');

7th May, 2018

topvillas left a reply on Get File_get_contents Of A View. • 2 weeks ago

Give it a try and see.

5th May, 2018

topvillas left a reply on Casting A String To A Boolean In An Elegant Way? • 2 weeks ago

@Cronix That's perfect. Exactly what I was looking for. Thanks.

topvillas left a reply on Casting A String To A Boolean In An Elegant Way? • 2 weeks ago

That would work but I'm passing it in a query string as part of an API. So I wanted to make the value nice and clean.

In the end I created a str_bool helper function (which is pretty ugly). But it keeps my controller code a bit cleaner and less blurgh!

topvillas started a new conversation Casting A String To A Boolean In An Elegant Way? • 2 weeks ago

I must have done this a million times but today it's started to bother me.

Is there a more elegant way to accomplish this. Casting to boolean clearly doesn't work because a non empty string is true.

$cascade = Request::get('cascade', 'true');
$cascade = $cascade == 'true' ? true : false;

topvillas left a reply on Cannot Login User With Auth::login() • 2 weeks ago

You should solve the first problem then.

Show us some code and we might able to help.

topvillas left a reply on Where Is The Parameter In This Function? • 2 weeks ago

getCurrentPosition takes a success callback function as it's first argument that takes a position as it's argument.

https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition

topvillas left a reply on How To Hide Parent Component When Displaying It On A • 2 weeks ago

They're sub routes of Home so they'll be displayed in the home components router view.

4th May, 2018

topvillas left a reply on Confused About Service Container • 2 weeks ago

Possibly not. Using app->bind comes in handy if you have a tree of classes with dependencies on other classes.

For simple cases just use the standard constructor.

3rd May, 2018

topvillas left a reply on Vue Why Props And Data Use Same Syntax As This.test? • 2 weeks ago

It's open source. Take a look at the repo.

topvillas left a reply on Generating A Unique Token • 2 weeks ago

str_random(10) and add the timestamp.

topvillas left a reply on Display Mutile Views Through Foreach Loop In Controller In Laravel • 2 weeks ago

Don't try and describe your code. Show it to us.

topvillas left a reply on A Medium Size Website With Laravel Vue • 2 weeks ago

It's the perfect answer. That's how you use javascript on a page.

topvillas left a reply on A Medium Size Website With Laravel Vue • 2 weeks ago

How to integrate Vue with Laravel.

Create a script with your VM in it. Load the script in the page.

2nd May, 2018

topvillas left a reply on XP System Broken • 3 weeks ago

@jlrdw JW's too busy churning out quality content or something stupid like that.

topvillas left a reply on XP System Broken • 3 weeks ago

Mark as best answer plz.

topvillas left a reply on XP System Broken • 3 weeks ago

It's almost like Ego Overflow but less whiney.

topvillas left a reply on What Framework / Template For A Webapp With Idea To Convert To Native App? • 3 weeks ago

What are you asking? Do you want us to choose a Bootstrap theme for you?

topvillas left a reply on Why Chromecast Rebooting Automatically? • 3 weeks ago

Mark this as correct answer plz.

topvillas left a reply on CANT CONNECT TO DATABASE • 3 weeks ago

Posting your .env file doesn't tell us anything.

Are the db credentials correct?

topvillas left a reply on Multiple Model In 1 File • 3 weeks ago

Not if you want to use autoload. As @36864 explained.

1st May, 2018

topvillas left a reply on Ordering Error • 3 weeks ago

Like @willcanniford said. Your numbers must be strings.

30th April, 2018

topvillas left a reply on Add Global Function Or Helper Function • 3 weeks ago

If it didn't work then you're doing something wrong.

topvillas left a reply on Cleaner Class Property Declarations? • 3 weeks ago

They are great but it still involves manually creating the getters and setters.

Edit Your Profile
Update

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