topvillas

topvillas

Member Since 5 Years Ago

Sandwich

Experience Points
209,745
Total
Experience

255 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
570
Lessons
Completed
Best Reply Awards
232
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

Level 42
209,745 XP
Mar
28
2 days ago
Activity icon

Replied to Cannot Import Component Inside Other Component

Are you absolutely sure you've got the relative path to the component right?

Mar
23
1 week ago
Activity icon

Replied to Good Examples Of REST APIs

Not really answering your question but.

If you're interested in making your APis completely restful the take a look at this excellent talk from Laracon 2017.

https://www.youtube.com/watch?v=MF0jFKvS4SI

Also, have a look at this cool package for exposing your API. Some of the "advantages" of GraphQL but without all the tedious setting up.

#https://laravel-jory.kolenberg.net/docs/3.0/overview

Mar
21
1 week ago
Activity icon

Awarded Best Reply on `Post` Vs `Get` Method

Use get purely for fetching data and post when you want to store something. Pay attention to the other HTTP verbs too.

Activity icon

Replied to `Post` Vs `Get` Method

Show and edit (for displaying a form) should use get, yes.

But, use put when submitting the edit form.

Activity icon

Replied to Google Drive Api

Maybe not but you can look at the source code and adapt it.

Activity icon

Replied to `Post` Vs `Get` Method

Use get purely for fetching data and post when you want to store something. Pay attention to the other HTTP verbs too.

Mar
18
1 week ago
Activity icon

Replied to Helpers In Lumen

What are you doing after you've installed the package? You'll need to get composer to autoload the file containing the functions.

Mar
14
2 weeks ago
Activity icon

Replied to User Registration Using Vue

You don't need the {data} part in your route. The form data is being sent in the body.

Activity icon

Replied to Do I Need To Go Through Videos Of All Version Of Laravel

No, JW covers everything you need to know in each "from scratch" series.

Mar
13
2 weeks ago
Activity icon

Replied to Nested Categories, How To Fetch A Full Branch?

If it's not too late, do yourself a favour and take a look at this package ...

https://github.com/lazychaser/laravel-nestedset

Mar
05
3 weeks ago
Activity icon

Replied to Shopping Cart

You don't have to use a package. Just look at the source and learn.

Feb
27
1 month ago
Activity icon

Replied to I Want Display Dynamic Marker On Google Map Using JS.

Put them in an array and loop over it.

Feb
17
1 month ago
Activity icon

Started a new Conversation Laravel And Lumen Running Under Same Apache Server

Hey peeps!

I've run into a bit of a problem. I'm running Laragon on Windows and have a Laravel site consuming an API driven by Lumen. Both running under the same Apache server.

My problem is that the Laravel site's .env leaks over into the Lumen API. Forcing it to use the Laravel site's database connection.

I've read that this is a known problem with Apache on Windows and that your config should be cached anyway but , of course, Lumen doesn't use config files.

Any suggestions on how to get around this would be much appreciated.

Feb
13
1 month ago
Activity icon

Replied to Securing API ( JWT )

JWT is good for authenticating users but no good for securing an API.

Get API users to generate an API key and make them to send it in a header with requests. Then do any checks you need in some middleware.

Feb
01
1 month ago
Activity icon

Awarded Best Reply on Unexpected Keyword 'export' Vue

In your app.js you'll need to include Vue (after making sure it's imported with) NPM or Yarn). Then run mix.

Make sure that app.js is included before the script tag in the blade file then put the code I showed above in the script tag.

Jan
31
1 month ago
Activity icon

Replied to Unexpected Keyword 'export' Vue

In your app.js you'll need to include Vue (after making sure it's imported with) NPM or Yarn). Then run mix.

Make sure that app.js is included before the script tag in the blade file then put the code I showed above in the script tag.

Activity icon

Replied to Unexpected Keyword 'export' Vue

export work in the browser (yet).

Use

let app = new Vue({
    al: '#app'
})

To create a VM on the page.

Jan
20
2 months ago
Jan
18
2 months ago
Activity icon

Replied to A

No.

<img :src="item.cover_image"> is what you need.

Activity icon

Started a new Conversation Typescript, Vue And Axios

This is a long shot but maybe somebody can help me out.

So, I've created a vue app using the CLI, and added axios which creates a plug-in file to configure and attach an axios instance to the Vue prototype. All good!

Under normal circumstances, you can access it with this.$axios.get('theurl') as you'd expect. But I'm using typescript so trying to use this.$axios results in Property '$axios' does not exist on type 'X'.

Any ideas on how to get around this would be much appreciated.

I could just create my own module to configure and export an axios instance but I'd prefer to do it in the idiomatic Vue way if at all possible.

Jan
17
2 months ago
Activity icon

Replied to POST Route

If you're using axios then just use the post method.

axios-.post('/your-route', {'this': 'great', 'that': 'awesome'})
.then(response => thing = response.data)
Activity icon

Replied to POST Route

Route::post('/this', '[email protected]');
public class TheController extends Controller
{
    public function post(Request $request)
    {
    }
}
Jan
13
2 months ago
Activity icon

Replied to Free Domain To Show My Laravel App.

Give Heroku a go. There's no better solution for non server peeps.

Jan
09
2 months ago
Activity icon

Replied to Laravel.

Yes.

Jan
08
2 months ago
Activity icon

Replied to Add Loader To Website While Axios Is Getting Data

I've not done anything like it but perhaps you could take advantage of Axios interceptors to set some sort of global loading state.

Jan
05
2 months ago
Activity icon

Replied to Vue Syntax

Just watch the free series about Vue.

https://laracasts.com/series/learn-vue-2-step-by-step

Activity icon

Replied to Vue Syntax

Yeah, just attach a Vue VM to a dom element and it'll take over from there.

Jan
01
2 months ago
Activity icon

Replied to How Would You Do Where Array Contains Value?

I've never used the JSON column type but it might be your friend here. From my limited understanding it's possible to carry out queries on the data in a JSON column.

I could be wildly wrong about that though.

Activity icon

Replied to How Would You Do Where Array Contains Value?

Why can't you just hold the weeks and sessions as integers in the job plan table?

Dec
30
3 months ago
Activity icon

Replied to Livewire.js 500 Internal Server Error

It doesn't look like it can't find the javascript, you're getting an internal server error.

Must be something else.

Dec
29
3 months ago
Activity icon

Replied to Display Price Range In Blade File

jQuery isn't reactive. It won't change the slider based on the value of an input.

You'll need to use a reactive framework (Vue) or find a small reactive library to watch the value of the input.

Dec
22
3 months ago
Activity icon

Replied to Unexpected Token O In JSON At Position 1

Because you're not receiving valid JSON.

Dec
21
3 months ago
Activity icon

Replied to Passing Collection From Laravel To Vue

You might need to call $questions->toJson().

Dec
19
3 months ago
Activity icon

Replied to Errors When Running Npm Run Production

Have you run npm install?

Dec
18
3 months ago
Dec
17
3 months ago
Activity icon

Replied to Recommendation

What do you want to learn?

Dec
11
3 months ago
Activity icon

Replied to How To Create Vuejs Data Copy.

Try using the spread operator ...

{ ...data  }
Nov
29
4 months ago
Activity icon

Awarded Best Reply on How To Cross Reference Tables

It'll be part of the user object.

user.role

Look at the network tab in the developer console to see what the async call is returning. Or do a console.log when the promise is resolved.

Activity icon

Replied to How To Cross Reference Tables

It'll be part of the user object.

user.role

Look at the network tab in the developer console to see what the async call is returning. Or do a console.log when the promise is resolved.

Activity icon

Replied to How To Cross Reference Tables

$allUsers = User::with('role')->get();
Activity icon

Replied to Npm Run Dev Error

Have you tried the solution offered in the issue?

Nov
26
4 months ago
Activity icon

Replied to Route Resources With Multiple Parameters.

Thanks @bobbybouwmann .

That didn't quite work but put me on the right track.

Route::resource('currencies.conversions', CurrencyConversionsController::class);

Did the trick.

Nov
24
4 months ago
Activity icon

Started a new Conversation Route Resources With Multiple Parameters.

Let's suppose I have a currency conversion resource that requires a from and to currency.

public function show(Currency $from, Currency $to)
{
    return new CurrencyConversionResource($from->conversionTo{$to));
}

Is it possible to use Route::resource('currency_conversion', CurrencyConversionsController::class) in a way that allows for two parameters?

Activity icon

Replied to Accessing Database From View

There's a course of Eloquent relationships here ...

https://laracasts.com/series/eloquent-relationships

Sorry for not being more helpful, but I'm as bit fuzzy and hungover this morning.