topvillas

topvillas

Member Since 5 Years Ago

Sandwich

Experience Points
213,385
Total
Experience

1,615 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
585
Lessons
Completed
Best Reply Awards
234
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 43
213,385 XP
Jul
03
6 days ago
Activity icon

Replied to Is There A User System Package ?

What do you need that the built in auth system doesn't provide?

Jul
02
1 week ago
Activity icon

Replied to Nested {{ }} In Php Laravel

Probably not a great deal more efficient, it's just string concatenation, but definitely easier on the eye.

Activity icon

Replied to Nested {{ }} In Php Laravel

Don't do it in the Blade template. Do it in the controller (or a view model) and pass it though to the template.

Jun
18
3 weeks ago
Activity icon

Replied to Is Javascript Better Than PHP

They're both as secure as you make them. What security issues are you concerned about?

Jun
16
3 weeks ago
Activity icon

Replied to Does It Matter How Many Models I Pass To My View?

If you're concerned about the number of classes being passed to the view, try just passing the data the view needs.

Either filter down the data into an array or take a look at this view model package ...

https://github.com/spatie/laravel-view-models

Jun
12
3 weeks ago
Activity icon

Replied to Execute Client System Application

You can't. Imagine the carnage if you could call executables from Javascript in the browser.

Activity icon

Replied to Perform Basic Calculation In Laravel Form

What are you having a problem with?

Jun
05
1 month ago
Activity icon

Replied to Laravel Integration

Linked how?

May
30
1 month ago
Activity icon

Started a new Conversation Anonymous Components Vs Includes

Does anyone know if either approach is significantly slower than the other (before caching)?

May
27
1 month ago
Activity icon

Replied to Which Is Better For Using API ?

If you don't need to manipulate your data in any way and you can just return it as is then use response(()->json(). Otherwise a Resource is a nice way to control what gets returned.

Activity icon

Replied to Make Loading State In SPA Mode

Here's a list of Tutbolinks events ...

https://github.com/turbolinks/turbolinks#full-list-of-events

Use

document.addEventListener("turbolinks:event", function() {
  // ...
})
May
20
1 month ago
Activity icon

Started a new Conversation VSCode And Blade Components

Does anyone know of any extensions for VSCode that accommodate the new L7 Blade component syntax nicely?

May
15
1 month ago
Activity icon

Awarded Best Reply on Moment JS And Date Formatting

let span = 6;
let duration = 'months';
let end = start.clone().add(span duration);

The clone part is important, Moment can catch you out by mutating dates.

Activity icon

Replied to Moment JS And Date Formatting

I'm not 100% sure but Moment should be able to parse that.

let start = moment(dateFromDataPicker);

if not use ...

let start = moment(dateFromDatePicker, 'Do MMM YYYY');

Docs about date parsing are here. https://momentjs.com/docs/#/parsing/

Activity icon

Replied to Moment JS And Date Formatting

let span = 6;
let duration = 'months';
let end = start.clone().add(span duration);

The clone part is important, Moment can catch you out by mutating dates.

May
07
2 months ago
Activity icon

Replied to Alpine.js Interfieres With Vue.js

No, they use the same directives and it doesn't look like they're customisable. All you could do is fork either Vue or Alpine and have a go at changing the directives they use yourself.

Apr
15
2 months ago
Activity icon

Replied to Bootstrap-vue And No Jquery

Bootstrap.js isnt what you're thinking it is. It's literally just bootstrapping the JavaScript in your app. Open it up and have a look.

Apr
01
3 months ago
Activity icon

Awarded Best Reply on CORS On Laravel 7

Are you sure it was a v7 app you created?

Activity icon

Replied to CORS On Laravel 7

Are you sure it was a v7 app you created?

Activity icon

Replied to CORS On Laravel 7

That's odd! Try going to the Laravel git repo and grabbing the config file from there.

Make sure you have the middleware and that it's enabled too.

Activity icon

Replied to CORS On Laravel 7

Did you update to v7 or create a new v7 project. You should have a cors config file if you created a new project.

Mar
28
3 months 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
3 months 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
3 months 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
3 months 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
3 months 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
3 months 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
4 months ago
Activity icon

Replied to Shopping Cart

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

Feb
27
4 months 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
4 months 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
4 months 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
5 months 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
5 months 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
5 months ago
Jan
18
5 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
5 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
5 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.