136 Followers
·
Follow

Dino Cajic explaining Laravel Seeders, Factories, and Fakers
Dino Cajic explaining Laravel Seeders, Factories, and Fakers

If you’re just starting out with Laravel, some of the first few questions that you’ll come across are:

  • What is the difference between Seeders, Fakers, and Factories?
  • Should I use them?
  • Do I need to use all of them or can I use some of them?
  • How do I create them?

If you’re looking up the answers to these questions, I would assume that you have Laravel already installed. If you don’t, and don’t know how, you can follow the steps in my other article:

Factories

According to Laravel’s official documentation, “factories are classes that extend Laravel’s base factory class and define a model property and definition method.” Just think about it this way. If you’ve ever created a model, like the User’s model (App\Models\User), you’ll know that certain fields should be populated when you use the create() method. …


Dino Cajic discussing Laravel 8 JetStream Installation
Dino Cajic discussing Laravel 8 JetStream Installation

If you’re not familiar yet, Laravel 8 has gone away from the auth scaffolding and is instead embracing the JetStream package. Before you can use JetStream authentication, you’ll want to make sure that you have the latest versions of PHP, composer, and the laravel installer on your system.

PHP

Make sure that you have the latest version of PHP installed. Laravel requires a PHP version greater than 7.3 as of the time that I’m writing this. Visit the official Laravel documentation to see the latest requirements.

Image for post
Image for post

Since there are so many ways to install PHP onto your system, I’ll leave it up to you to Google how to upgrade your PHP to the latest version. With Windows users, you’ll most likely be using WAMP or XAMPP (if you’re not using Homestead). Search for how to upgrade to the latest version of PHP for your option and then search for how to edit the environmental variable to add the latest version to the path so that it’s accessible in CMD. …


Dino Cajic discussing Class Props Destructuring in React
Dino Cajic discussing Class Props Destructuring in React

If you’ve looked at React code before, there’s almost a 100% chance that you’ve seen destructuring. If you look at most import statements for class-based components, you’ve more than likely seen something like this:

import React, { Component } from 'react';class ClassName extends Component { ... }

The { Component } is an example of destructuring. If we didn’t use destructuring, we would have had to use the following syntax in our class declaration:

import React from 'react';class ClassName extends React.Component { ... }

What exactly is destructuring? It’s just a way to extract multiple keys from an object or an array and assign them to a variable. …

About

Dino Cajic

Author of An Illustrative Introduction to Algorithms. A Software Engineer with a B.S. in Computer Science, a minor in Biology, and a passion for learning.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store