dlebedef

Member Since 2 Years Ago

Experience Points
17,560
Total
Experience

2,440 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
158
Lessons
Completed
Best Reply Awards
1
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.

  • Community Pillar

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

Level 4
17,560 XP
Jan
23
2 days ago
Activity icon

Replied to Inertia Link Server Side

Actually I can store "<inertia-link></inertia-link>" on the database and then pass it as a template to a vue component and it gets compiled to a link.

So turns out this is possible. In case anyone is curious about the solution I can try to provide the elements needed to achieve this.

Jan
22
3 days ago
Activity icon

Started a new Conversation Inertia Link Server Side

Is it possible to generate "inertia-links" on the server side?

I'm working on a CMS and I would like the links inside the content (created by the user with a text field) of a page to act as inertia-links, hence load the page content without reloading the page.

Example:

<template>
	<div v-html="content"></div>
</template>
<script>
	export default {
		data() : {
			content: '<p>This is a paragraph...</p><inertia-link :href="/link-to-other-page">Link to other page</inertia-link>'
		}
	}
</script>

Wanted behaviour: if someone clicks on the link "Link to other page" we load the page dynamically.

Is there an existing or correct way to pass an html content to a vue template containing a link and making it so that when the html content is rendered and someone clicks on the link the page content is loaded dynamically without reloading the page?

Hope I made myself clear...

Dec
08
1 month ago
Activity icon

Started a new Conversation Sanctum, Abilities, Roles And Permissions

This is more a question of "best practices" rather than giving a code solution (which I'm not after).

I'm in the process of developing a web application accompanied by a mobile app. I was looking into Sanctum and the possibility of passing abilities when creating a Token.

Given that I'll be using Role, Permissions (spatie/laravel-permission package) and Policies for the web app, is it recommended to relie on the same authorisation checks also for the mobile or should I make different policies?

For example, let's say that I have a policy to limit the creation of posts to users having the role of editor with permission create post. Should I grant the same permission/ability to the token associated to that same user on the mobile app and on the same policy check if $request->expectsJson()then check the token capabilities, otherwise check the user's roles and permissions?

Would this be the right approach or is it better to separate the token based logic (and policies) from the web based one?

Nov
22
2 months ago
Activity icon

Replied to BelongsTo Relationship + Main Contact

Yes indeed, little problem that I noticed while I was doing a migrate:refresh. Good to know though!

Thanks again and have a nice day!

Activity icon

Replied to BelongsTo Relationship + Main Contact

Yes, I was after some suggestions on best practices more than actual codes. Appreciate very much your response.

I was also going for this kind of structure where a company has a contact_id linked to the users table. So unless anyone else comes up with some valid alternative solution I guess I'll just stick to this one.

Thanks again!

Nov
21
2 months ago
Activity icon

Replied to BelongsTo Relationship + Main Contact

Yes of course, maybe I wasn't clear enough, but what I would like to understand is what would be the best approach to say the user A who belongs to company X is also its main contact.

Where and how would I store this information? Should I:

  • have a boolean in the users table named is_main_contact?
  • have a main_contact_id in the companies table assigning it a foreign key to the users table?
  • other solution?

What would be the best approach to handle the main contact feature?

Activity icon

Started a new Conversation BelongsTo Relationship + Main Contact

What would be the best way to have this relation:

  • Company
  • User

A company can have many users, a User belongs to one company and each company has a main contact (user).

And by best way how should I structure the migration and relationships the two models?

Oct
31
2 months ago
Activity icon

Awarded Best Reply on Laravel 8 Login With Multiple Characters

My approach would be to have a Character model and table in the DB where each character would be associated to the user who created it. Then somewhere store and handle which one is the current active character and from them load its content.

Oct
25
3 months ago
Activity icon

Replied to Laravel 8 Login With Multiple Characters

I'm not sure what do you mean by middleware? Based on your question it sounded more like an issue of "structure" and how to handle characters.

Laravel's definition of middleware is:

Middleware provide a convenient mechanism for filtering HTTP requests entering your application. [...]

Activity icon

Replied to Jetstream: Redirect After Login Based On Role

Thanks, this is exactly what I was looking for!

Activity icon

Replied to Laravel 8 Login With Multiple Characters

My approach would be to have a Character model and table in the DB where each character would be associated to the user who created it. Then somewhere store and handle which one is the current active character and from them load its content.

Activity icon

Started a new Conversation Jetstream: Redirect After Login Based On Role

I've found many different answers on how to handle a redirection after a successful login based on user role, but what I'm looking for is the best and proper way to achieve this with Jetstream (Fortify).

For instance admin would be redirected to '/dashboard' and user would be redirected to '/home'.