Category: hosttech

  • Factories

    You can use Factories to quickly scaffold example data. Meaning that you can very easily create a few dozen to hundreds or even thousands of rows / entries of example data in a database table. Create a Factory Here’s how you can create a factory (command prompt): This will create a “PostFactory” Factory class in:…

    Zum Beitrag

    //

  • Migrations

    A migration displays a table in a database. What’s special about this is that this is written in PHP and you can directly access it from your project folder / code editor.In Laravel it will automatically create them for you to a certain extend. You can find all these migrations in the following directory: database->migrations.…

    Zum Beitrag

    //

  • Eloquent

    Eloquent is an ORM (Object Relational Mapper). An ORM maps an object in your database, like a table row, to an object in PHP code. This is Laravel’s Active Record implementation.Now an important thing to remember the Class is the singular form of the Table name. For example: Now if for example you have a…

    Zum Beitrag

    //