topvillas

topvillas

Sandwich

Member Since 3 Years Ago

Experience Points 191,445
Experience
Level
Lessons Completed 472
Lessons
Completed
Best Reply Awards 222
Best Answer
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

23 Sep
2 months ago

topvillas left a reply on Nova Folder?

I haven't used Nova yet but from watching Taylor's talk about it at Laracon, that looks like the normal behaviour.

21 Sep
2 months ago

topvillas left a reply on Transform Blade In A Vue

Give the breadcrumb items to the component as a prop and loop over them with v-for

20 Sep
2 months ago

topvillas left a reply on Access To Request Element That Start With The Same Name

Can't you just use the PHP array syntax?

{{Form::text('name[],'',array('class'=>'form-control'))}}

You'll then be able to use the posted input name as an array.

topvillas left a reply on Not Displaying Google Charts In Laravel App

What does the analytics variable look like if you view the source?

19 Sep
2 months ago

topvillas left a reply on Separating API Controllers And Web Controllers

Create an API directory in the controllers directory and namespace the controllers.

15 Sep
2 months ago

topvillas left a reply on Cross Project Login

If it's a standard site (meaning not sending AJAX requests) then that's not going to be possible as you can't instruct the browser which headers to send. You could try and use cookies but neither of the sites will be able to read cookies from other.

I don't know though, somebody else might have a bright idea about how to achieve this.

Like I said though, the other solution is a seperate service for authentication that both sites can contact.

topvillas left a reply on Cross Project Login

It's possible and everyone's life would be easier if everything was automated.

The problem you have is sharing sessions. I've never done anything like it but my first thoughts are that you'll need to create an auth service for different projects to contact.

topvillas left a reply on When To Use Config Files?

Config files ARE associative arrays.

There's no hard and fast rule about when to create them but it's a lot tidier than putting stuff randomly in classes.

topvillas left a reply on Should All Items Data Be Load In Vuex?

No, the flux pattern is useful if you use data in a complex way across your site. If you're just fetching data to display then forget it.

14 Sep
2 months ago

topvillas left a reply on Should I Pass $request To Repository?

I'd say no. The repository shouldn't be concerned with the request, that's the controller's responsibility.

I'd pass an array of values fetch from the request.

topvillas left a reply on Http.get

What do you mean by storing http.get(API)?

You're not storing anything, you're just calling the angular http service.

topvillas left a reply on How Not To Repeat Your Code In All Controller Routes?

Create a private function and put the common stuff in there.

topvillas left a reply on Http.get

Assuming http is a reference to axios or the fetch client. How else are you going to consume an API?

11 Sep
2 months ago

topvillas left a reply on Vue Problem

Give us some code and we might be able to help.

topvillas left a reply on How To Insert Into Table Only If The Status Is "approved" In Other Table?

Do a query to check the approved status then use an if statement.

10 Sep
2 months ago

topvillas left a reply on Membership Website

composer create-project --prefer-dist laravel/laravel external-website

topvillas left a reply on Using Components Within Components

Try import Building from './building.vue'

09 Sep
3 months ago

topvillas left a reply on Why .env And App/config.php Has Same Config? And Why Config.php Is Used?

.env is not where you'll store anything that you need to keep secret. API keys. password etc.

config.php is where you actually configure things used by the app (possibly using the secret stuff stored in .env).

Local is your development environment, so you want to have errors turned on and production is where you don't want anyone to see what might have gone wrong (just a HTTP 500 error page).

07 Sep
3 months ago

topvillas left a reply on Route Model Binding For 2 Routes Does Not Work As Expected

Yeah, patterns are the same. There no way for the router to know your not looking for a category.

topvillas left a reply on Promotion Discount Syatem In Laravel

Store the discount details as json (you're using Mongo so not a biggie).

Create a class, implementing an discount interface, for each type of discount.

05 Sep
3 months ago

topvillas left a reply on Define A Variable In Console

Maybe you could rephrase the question. At the moment, it doesn't make sense.

topvillas left a reply on "Global Instance" Of A Class Everywhere

Use a service provider and bind the class to the app.

app()->singleton('my_security', function() {
    return new MySecurity;
});
03 Sep
3 months ago

topvillas left a reply on Get Model's Class Name From Eloquent Collection Even If The Query Does Not Return Any Results

There isn't a model. The collection is empty.

But, you might find this useful.

https://laravel.com/docs/5.6/eloquent-collections#custom-collections

Create a custom collection and store the model name in it.

topvillas left a reply on Get Model's Class Name From Eloquent Collection Even If The Query Does Not Return Any Results

Yeah, you're right. But you still can't get the model name.

02 Sep
3 months ago

topvillas left a reply on Blade Syntax Inside JQuery

Is the javascript inline?

01 Sep
3 months ago

topvillas left a reply on Binding Many Singleton Is Harmful ?

No, you couldn't instantiate a bound object at startup because they're transient.

topvillas left a reply on Binding Many Singleton Is Harmful ?

Yeah, the bindings will happen with every request but they'll only be instantiated when you need them. And no, instantiating classes has pretty much zero overhead.

topvillas left a reply on About Domain Name And Stuff

Watch the Laravel from scratch series.

31 Aug
3 months ago

topvillas left a reply on Problem Loop Json In V-for Vue.js

this.hubs = data

topvillas left a reply on Problem Loop Json In V-for Vue.js

You need to assign the data to hubs.

topvillas left a reply on Parent_child

Give each row a parent or child id.

30 Aug
3 months ago

topvillas left a reply on "Cannot Declare Class Already In Use" Integrating Legacy File System

You could possibly use an alias.

use Bankdate as BankdateSomething
29 Aug
3 months ago

topvillas left a reply on PATCH Form Does Not Call Update Function

Doing a bit of reading, put, patch and delete aren't part of the html 5.0 spec. So it's not really a browser thing.

topvillas left a reply on DIPLAY BUTTON NEXT PREVIEW IN DATATABLES

If you have the page number add one to it.