topvillas

at TopVillas

Hire Me

Experience

152,285

183 Best Reply Awards

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

17th January, 2018

topvillas left a reply on NodeJs • 1 day ago

It's an implementation of V8 used for standalone Javascript applications.

Oh, yes. It's still popular. About as popular as it gets.

topvillas left a reply on How Can I Protect My Laravel Application • 1 day ago

What sort of attack?

16th January, 2018

topvillas left a reply on Get Id Of Specific Item In List • 2 days ago

@file-choose="handleCroppaFileChoose(myCroppa[1])"
handleCroppaFileChoose: function(item){
        console.log(item);             
 },

topvillas left a reply on Get Id Of Specific Item In List • 2 days ago

Pass the id of the item that triggers handleCroppaFileChoose

Show us your template.

topvillas left a reply on Get Id Of Specific Item In List • 2 days ago

You want me to tell you how to pass parameters to functions?

topvillas left a reply on Scout + Algolia But Not Elastic. Why Is That? • 2 days ago

No idea. Ask Taylor on Twitter.

topvillas left a reply on Static Methods On Eloquent Model • 2 days ago

The downside is that (in my opinion) it doesn't really belong in the model object. It's domain logic that belongs somewhere else.

I'd recommend some sort of repository.

topvillas left a reply on Get Id Of Specific Item In List • 2 days ago

Pass the id to the function.

topvillas left a reply on Static Methods On Eloquent Model • 2 days ago

Don't use static methods if you need the query builder.

Static methods are great for making complete queries and returning the results.

topvillas left a reply on Push Response To Table • 2 days ago

Are you sure that's the response? The JSON object has no commas separating the key/value pairs.

topvillas left a reply on How To Increase My Website Traffic (http://www.shubhashishit.com) • 2 days ago

You could start by putting a description and some keywords in your meta data.

topvillas left a reply on How To Increase My Website Traffic (http://www.shubhashishit.com) • 2 days ago

You could start by putting a description and some keywords in your meta data.

topvillas left a reply on Blade Templating • 2 days ago

The HTML in your formBagage is probably badly formed.

topvillas left a reply on View [categories.create.blade.php] Not Found. • 2 days ago

You've got two spellings of categories/catogiries.

15th January, 2018

topvillas left a reply on How Does IsRoomBooked() Function Work ? • 3 days ago

It checks if the $start_date or $end_date overlap any records in the reservations table.

topvillas left a reply on Performance More Requests Vs Complex Relationship • 3 days ago

Try them both and measure the performance with debug bar ...

https://github.com/barryvdh/laravel-debugbar

topvillas left a reply on Will Laravel Suit My Need ? • 3 days ago

Yes. But Laravel isn't going to hold your hand with the achievements part.

14th January, 2018

topvillas left a reply on How I Display Data From Another Table By Id From My Current Table? • 4 days ago

You start off by reading the docs about Eloquent relationships.

topvillas left a reply on How I Display Data From Another Table By Id From My Current Table? • 4 days ago

If you're fetching the master model then you must have it's id already.

But you should probably be looking at relationships if your tables are linked somehow,

https://laravel.com/docs/5.5/eloquent-relationships

topvillas left a reply on Laravel FCM • 4 days ago

topvillas left a reply on Blade Template Includes With Includes • 4 days ago

If there's no logged in user then there won't be a name property.

Check Auth::user() isn't null before you try and access it's properties.

@if (Auth::user() !== null)
{{ Auth::user()->name }}
@else
<span>Something else</span>
@endif 

topvillas left a reply on Websocket Help Needed • 4 days ago

Decide which websocket library you like the look of.

Then implement the API.

topvillas left a reply on Google Map - Not Loading When Refresh Page • 4 days ago

Load the google map api script after your inline script. It's sometimes managing to load before the inline script and is unable to find the callback.

topvillas left a reply on Handling Multiple Objects In One Action Method • 4 days ago

I don't understand what you're asking in your wall of text. But decode the json, turn it into a collection and use the collection methods.

13th January, 2018

topvillas left a reply on Unable To Logout From Laravel Application When Using Event.preventDefault. Alternative? • 5 days ago

Your form will be using a post route but the link will be using a get route.

Unless you have them both, one of them will fail.

topvillas left a reply on Sessions Are Not Saving : Bug In Laravel Core • 5 days ago

$request->session()->put('key', 'value);

topvillas left a reply on How Can I Run `npm Run Production`only When The Mix-manifest Changed? • 5 days ago

If you're writing Javascript then you can write a Node module.

topvillas left a reply on Next Next Save Form • 5 days ago

Save the form data in the session.

topvillas left a reply on How Can I Run `npm Run Production`only When The Mix-manifest Changed? • 5 days ago

I don't think you can. How would webpack know if the manifest has changed?

The best you can do is write a node module that saves a copy of the manifest when it's run and do a diff on the current manifest. Or saves a date to a file and checks it against the last updated date of the current manifest.

topvillas left a reply on Update Method • 5 days ago

The solution is to find where you're trying to load a Blade template that doesn't exist.

topvillas left a reply on Update Method • 5 days ago

We could keep going forever.

Somewhere you're referring to a Blade template at partials.html.php and it doesn't exist.

The path would be partials/html/php.blade.php. It looks like you might have got your naming a bit mixed up.

topvillas left a reply on Update Method • 5 days ago

... and you cms.layout template.

topvillas left a reply on Update Method • 5 days ago

Looks like something's going a bit wrong with an @include or @extends.

Show us the full Blade template.

topvillas left a reply on Update Method • 5 days ago

You haven't told us what the problem is.

But, if you're type hinting Company as a parameter but passing it an integer.

topvillas left a reply on Undefined Variable In Function With Query • 5 days ago

    ...
}

topvillas started a new conversation Series Navigation. • 5 days ago

Just a little suggestion.

At the moment the series navigation arrows that are overlayed on videos disappear if you move your mouse off the video.

It would be great if they disappeared after the mouse has been inactive for x seconds.

topvillas left a reply on Count Collection Inside Collection • 5 days ago

$collection->count()

topvillas left a reply on Those Five Little Words ... • 5 days ago

I know, I was trying to be funny too.

In Soviet Russia, Javascript frameworks choose you.

topvillas left a reply on Lavavel CMS • 5 days ago

There's no point in posting links to your localhost.

Here's all the help you need ...

https://laravel.com/docs/5.5/blade#template-inheritance

topvillas left a reply on Open Multiple Laravel Project At A Time • 5 days ago

Open them using different ports ...

php artisan serve --port 3000 php artisan serve --port 3001

12th January, 2018

topvillas left a reply on Bad Design Website ,,,base Color For Laravel Site Is Red And Is Bad For Eyes • 6 days ago

To what? It's the color from the Laravel logo.

It's not the base colour, it's used in some headers, links and boxes.

Are you seriously saying that red is bad for your eyes?

Besides, Laracasts doesn't have anything to do with the Laravel site.

topvillas left a reply on How Can I Print Range Slider 0 Index Value • 6 days ago

Your callback params need to be a bit different

function(event, ui) {
    console.log(ui.values[0]);
    console.log(ui.values[1]);
}

https://api.jqueryui.com/slider/#event-slide

topvillas left a reply on Guidence On How To Deploy My Laravel Websites. • 6 days ago

I'd take a serious look at Digital Ocean. Their low spec droplets are very reasonable and you can upgrade as and when you need to.

You could face problems with shared hosting on Godaddy if you need to do anything SSHy.

topvillas left a reply on Setted Routes Don't Work • 6 days ago

Nope, I don't have a clue why rebooting solved the problem.

topvillas left a reply on One To Many Relationship Problem • 6 days ago

That depends on what you're trying to achieve.

If you want a specific student ...

$record->student()->where('id', $id);

Or, if you want a loop over a list of students ...

$records->student()->each(function($s) {
    // something here
});

Incidentally, as it's a hasMany relationship, you might want to call the methods students rather than student.

topvillas left a reply on One To Many Relationship Problem • 6 days ago

Assuming the $record is a department. A department has many students. It has no idea which student you're referring to.

topvillas left a reply on Setted Routes Don't Work • 6 days ago

When you say they stopped working, do you get a 404 or 500 error?

topvillas left a reply on Guidence On How To Deploy My Laravel Websites. • 6 days ago

You say your domains are registered with Godaddy, but are you asking for opinions about where to host your site?

Edit Your Profile
Update

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