filmov
tv
[Laravel 7 Lesson 12] Factories & Seeders (Seed database with faker data)
Показать описание
[Laravel 7 Lesson 12] Factories & Seeders (Seed database with faker data)
In the 12th lesson of our Laravel 7 from the ground up series, we're going to start by removing our PostController, Post Model, and posts table and associated table migration.
Crazy? How come you ask, well honestly -- because we can create all of those files plus two more within a single artisan command.
Within four minutes, we will review our lesson, remove the model, controller, and migration, and then re-create the model, controller, and migration.
For the remainder of our lesson, we will focus on factories and seeders, ultimately populating our database with dummy data.
~~~~~~~~~~~~~~~~~~~~
Clean Code Studio ~ Simplify!
Clean Code Clean Life
~~~~~~~~~~~~~~~~~~~~
~~~~~
Github
~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~
NpmJS Packages
~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~
Packagist (Composer) Packages
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~
LinkedIn
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Looking for hosting? Three options to consider
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Laravel Forge is my go to for monolithic apps.
- You'll need a digital ocean or AWS server
- Laravel Forge starts at $12/month + the cost of your server
- Expect to pay between $25-$50/month with cost variance depending on your server
(Note: Hostgator is the most cost friendly hosting and linked to below).
Laravel Vapor is my go to for Serverless non-monolithic applications
- Vapor needs to be connected to an AWS account
- Vapor itself will run you $39/month + the cost of your aws cloud infrastructure
- Apps expecting major traffic needing horizontal scaling capability may want vapor.
- Price point: Expect to spend $100/month and be happily surprised if its less. The price for serverless majorly varies based on proper configuration and traffic. If everything is set up properly, and you have a lot of traffic serverless will spend you money. That being said -- it's nothing short of complex. Vapor simplifies the complexity of serverless cloud computing to an extent. Price point for Laravel Vapor per month with Aws setup: $90 to A lot of $/month.
3. Hostgator
- Starts at $2.75/month
- Cost-friendly
- Beginner friendly
- Not as powerful or configurable as Forge or Vapor
- Solid hosting provider for small sites like your portfolio
- cPanel offered with upgraded plan, also easy to upgrade
In the 12th lesson of our Laravel 7 from the ground up series, we're going to start by removing our PostController, Post Model, and posts table and associated table migration.
Crazy? How come you ask, well honestly -- because we can create all of those files plus two more within a single artisan command.
Within four minutes, we will review our lesson, remove the model, controller, and migration, and then re-create the model, controller, and migration.
For the remainder of our lesson, we will focus on factories and seeders, ultimately populating our database with dummy data.
~~~~~~~~~~~~~~~~~~~~
Clean Code Studio ~ Simplify!
Clean Code Clean Life
~~~~~~~~~~~~~~~~~~~~
~~~~~
Github
~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~
NpmJS Packages
~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~
Packagist (Composer) Packages
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Looking for hosting? Three options to consider
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Laravel Forge is my go to for monolithic apps.
- You'll need a digital ocean or AWS server
- Laravel Forge starts at $12/month + the cost of your server
- Expect to pay between $25-$50/month with cost variance depending on your server
(Note: Hostgator is the most cost friendly hosting and linked to below).
Laravel Vapor is my go to for Serverless non-monolithic applications
- Vapor needs to be connected to an AWS account
- Vapor itself will run you $39/month + the cost of your aws cloud infrastructure
- Apps expecting major traffic needing horizontal scaling capability may want vapor.
- Price point: Expect to spend $100/month and be happily surprised if its less. The price for serverless majorly varies based on proper configuration and traffic. If everything is set up properly, and you have a lot of traffic serverless will spend you money. That being said -- it's nothing short of complex. Vapor simplifies the complexity of serverless cloud computing to an extent. Price point for Laravel Vapor per month with Aws setup: $90 to A lot of $/month.
3. Hostgator
- Starts at $2.75/month
- Cost-friendly
- Beginner friendly
- Not as powerful or configurable as Forge or Vapor
- Solid hosting provider for small sites like your portfolio
- cPanel offered with upgraded plan, also easy to upgrade
Комментарии