Member Since 5 Months Ago

Experience Points

2,480 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
Best Reply Awards
Best Reply
  • start-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-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-token Created with Sketch.


    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.


    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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 2
7,520 XP
1 day ago
Activity icon

Replied to Database

Thanks @christophharms I am certainly leaning that way I was just unsure what peoples thoughts were on this.

Alot of people slam Wordpress and notice the method I was thinking and you have mentioned is very similar hence why I did ask the question.

Thanks for your input though it really is appreciated.

Activity icon

Started a new Conversation Database

Hi There,

I am looking at building a CMS and am wondering the best way to structure the database.

I have pages creating with rows in a table standard stuff but I also want to introduce custom fields which would be different on a per page basis.

I have seen this implemented differently on systems through out sites I have worked on some have another table which creates data per row per page and relate this to the page ID (ACF Wordpress). Others I have seen add an additional column to the pages table so it is only used for one page but adds to the entire table (Expression Engine).

I know columns are lighter in weight but I feel 100s of columns is a little messy if it ends up adding a column or multiple columns per page which are only used once. However if it is a well used CMS using rows in another table may end up with millions of rows which could cause performance issues.

Has anyone done a similar piece of functionality which relates to this?

Obviously Laravel will handle this no problem and is a great platform to use to do this, I am more interested into how people have attacked this?

Many Thanks J

3 weeks ago
Activity icon

Replied to Database Table Size

Hi both,

@dalma Thanks for that did not realise it went up that far!

@douglasakula It is a calculator on the frontend so a user would pick column A value so I would show rows associated to this for column B. On column B selection I would then know exactly which row I need.

I will then store 50 - 80 values from the columns to run a calculation to display what products they are suitable for.

The more I am saying it now I suppose the one row option is more suitable as if I am doing 3 lookups per user it may become exhaustive use to look over a second tables rows over and over for the 50 - 80 values if that makes sense.

Thanks both it is appreciated.

Activity icon

Started a new Conversation Database Table Size

Hi There,

I am after some general advice on a method and what Laravels capabilities are. I have a spreadsheet with over 155,000 values (around 500 rows long with 210 columns approx).

The first two columns define the row that will be used then I will be using the other columns for values on the product for a calculation.

I am torn between two ways creating a huge table to store all the data or 2 tables one storing the core data so ID, first column and second column then another table with each other value (190+ per row of table 1) as a single row with the ID relatable.

I think my second option will be more taxing as it will create over 100k rows than using one table with fewer rows but more columns.

Does anyone have experience in handling this amount of data and which one will give the better performance benefit?

Thanks in advance.

1 month ago
Activity icon

Replied to Laravel Mailable Firing Twice

Hi Poboy,

I have the same with the verification email, did you managed to resolve this?

Many Thanks Jamie

5 months ago
Activity icon

Started a new Conversation Recursive Hierarchy Tree

Hi All,

I am looking for some advice on a recursive method I am trying to add into a resource controlled to return flat SQL data in a tree like format for the backend.

I am aware this has been posted before as I have used one post but it does not seem to work for me as follows is my data and desired output :-

id parent_id text

1 0 Parent

2 1 Child

3 2 Descendant

4 0 Parent 2

5 1 Child 2

5 1 Child Other Parent

Tree Required :-


-- Child

--- descendant

-- Child 2

Parent 2

-- Child Other Parent

I did try the following post and suggestion from @bobbybouwmann :-


function buildTree(array $elements, $parentId = 0) {
    $branch = array();  
foreach ($elements as $element) {
   if ($element['parent_id'] == $parentId) {
        $children = buildTree($elements, $element['id']);
        if ($children) {
            $element['children'] = $children;
        $branch[] = $element;

return $branch;


$tree = buildTree($rows);

My data array is passing to the method fine and I can dd the elements right up until $children when I try to re use the method. The result of $branch is an empty array.

I understand how this is meant to work but am a little puzzled as to why I get an empty data set. I am happy if it is an array of data or collection preferably a collection.

As I do not have a limit or cannot foresee how deep the tree may go I wanted to make a dynamic loop of the table so I could output this in order in nested 'ul' containers so it would work regardless of the depth.

Pretty sure someone will have done something similar to the above just wondering anyone else's thoughts on this and if they have experienced similar issues.

Thanks in advance Jamie

5 months ago
Activity icon

Replied to Database Structure

@bobbybouwmann Thanks for this much appreciated.

I am going to run with the manytomany but to a terms table which will be assigned a taxonomy group label so I can group them as collections through the model.

I only anticipate this to grow to 500 terms in total so this will work fine. As you kindly pointed out and thanks for doing so if it were a huge table with lots of rows this would need a refactor and split into other tables should I come up against bigger tasks so thanks for this pointer it will certainly make me look at all these avenues moving forward.

Thanks for your help guys.

5 months ago
Activity icon

Replied to Database Structure

Hi Guys,

Thanks for your feedback as mentioned it is appreciated more than you can realise.

I think polymorphic maybe the way to go so the main category would be the ID and Type and I can morph in server models ie Sector/Service/Area and the polymorphic table would hold the term names.

I think I would achieve what I need and also only require 1 table per instance.

I am sure I will be back with more questions in other areas but great to have a group of experienced developers to help me plan moving forward.

Many Thanks Jamie

5 months ago
Activity icon

Replied to Database Structure

Morning Guys,

Thanks ever so much for your feedback it is extremely helpful.

@bobbybouwmann Yes the Keywords side I have a one to many as it is just strings so all projects could have any number of different words applicable to that project only.

I suppose it was the next areas I mention Service/Sector/Areas these would be pre populated checkboxes almost like they are there own categories. Similar to how Wordpress would work with Taxonomies Services/Sector/Areas would be there own taxonomy and would hold 10 terms each so in the backend the user could check which terms apply to each project. In this case as you mention a many to many. I just wasn't sure if creating a table with a pivot table on a many to many for each taxonomy was the right way to go. Seems like a lot of tables to create just to run these. Basically am I working smart enough or is this the right thing to do, this is where experience is probably lacking.

@snapey Ah this is great I will take a look I think this is what I need to see real world builds using complex functionality. From a tagging perspective I have this running as I would like with a one to many it was more the additional areas as mentioned above. As looking at it I would need 3 tables with additional pivot tables so I can then use a search to look through these to gather all related project IDs on the frontend. I am unsure if I am overthinking or not working smart enough.

The best example as mentioned above is similar to the Wordpress setup I have used in the past numerous Taxonomies which hold numerous Terms where the terms are related to the projects but each term could belong to numerous projects if that makes sense. I am aware there is a WP taxonomies package for this but also am I looking at it like this because of my past developments with Wordpress and limiting myself to a better way of approaching this with Laravel.

Again appreciate all your guys help I am just interested in how other PHP users would approach this and the smartest way to tackle this.

5 months ago
Activity icon

Replied to Database Structure

Hi John,

Thanks for your reply thats great and good to know.

I suppose from a search perspective I have a keywords relationship table but from the example above if each area ie Service/Sector/Areas where each project could have more than one of each would you also create a table to house each of these?

Or would you run this similar to how Wordpress uses Terms/Taxonomies so you can hold multiple category/values in 1-2 tables. I suppose this is where I am lacking the guidance.

Thanks again for your reply much appreciated.

Cheers J

Activity icon

Started a new Conversation Database Structure

Hi There,

I have just done the Laravel 5.7 tutorial and I am getting my hands dirty. Really impressed with it all at the moment with how much Laravel pre thinks for you and eloquent is just a breeze I am just after a little help which I suspect is down to lack of experience.

As I am mainly self taught I do not have much knowledge in building larger scale applications.

I already have an admin area and frontend all working and saving so happy with all this. The end game is to basically have a bunch of projects created in the backend and then pull them into the frontend via a search on a map.

I have a solid idea on the save and the frontend and have this working it is the search and how I should save/relate the data to make sure I can pull it all in and not run into brick walls.

I have created my projects table for simple data which is just to show on the projects single page. However I have the following :-

Keywords - Multiple entries per project comma separated (string) Areas - Numerous counties via select box (string) Value - Range (numeric) Sector - Checkboxes which would have the ability to increase over time (string) Service - Checkboxes which would have the ability to increase over time (string)

I have started on Keywords and save this on a one to many relationship with a Keywords table saving each keyword to the projects ID which all works fine.

All this data will all be used to search/filter results down. I understand the concept of pivot tables and many to many relationships so I can build this I am just unsure whether creating another table for each filter variable is OTT or how best to approach this.

How would someone else look at this, I am expecting some abuse/newb related feedback here as explained above I have not built anything over a 1/2 table relationship before and originally started out on Wordpress so a little help as to how someone with experience in Laravel would approach this or a tutorial on how to gain more experience would be greatly appreciated.

Thanks in advance J