|
1 | 1 | import { Callout } from "nextra-theme-docs"; |
| 2 | +import ExternalLink from "../../components/external-link"; |
2 | 3 |
|
3 | 4 | ## 🗒️ Introduction |
4 | 5 |
|
5 | | -Like [Eloquent Factories](https://laravel.com/docs/10.x/eloquent-factories) this package enables you to define factories for your entities, integrating CycleORM with Laravel's elegant syntax and functionality. |
| 6 | +Like <ExternalLink href="https://laravel.com/docs/10.x/eloquent-factories">Eloquent Factories</ExternalLink> this package enables you to define factories for your entities, integrating CycleORM with Laravel's elegant syntax and functionality. |
6 | 7 |
|
7 | | -This feature is available through the [wayofdev/laravel-cycle-orm-factories](https://github.com/wayofdev/laravel-cycle-orm-factories), be sure to check [installation](/installation#-database-factories-optional) instructions. |
| 8 | +This feature is available through the <ExternalLink href="https://github.com/wayofdev/laravel-cycle-orm-factories">wayofdev/laravel-cycle-orm-factories</ExternalLink>, be sure to check [installation](/installation#-database-factories-optional) instructions. |
8 | 9 |
|
9 | 10 | When testing your application or seeding your database, you may need to insert a few records into your database. Instead of manually specifying the value of each column, this package, same as Laravel, allows you to define a set of default attributes for each of your [Entities](/usage/entities) using factory classes. |
10 | 11 |
|
@@ -59,7 +60,7 @@ Factory classes should implement: |
59 | 60 |
|
60 | 61 | * `makeEntity` (optional) — method allows you to control the process of creating an entity through its constructor. The method takes an array of definitions as an argument, which is generated by the `definition` method. |
61 | 62 |
|
62 | | -Use the `definition` method to specify properties, utilizing the [Faker](https://fakerphp.github.io) library, which provides a wide range of fake data generation methods such as names, addresses, phone numbers, etc. |
| 63 | +Use the `definition` method to specify properties, utilizing the <ExternalLink href="https://fakerphp.github.io">Faker</ExternalLink> library, which provides a wide range of fake data generation methods such as names, addresses, phone numbers, etc. |
63 | 64 |
|
64 | 65 | ## ⚡️ Creating Entities using Factories |
65 | 66 |
|
@@ -202,7 +203,7 @@ class PostFactory extends AbstractFactory |
202 | 203 |
|
203 | 204 | In addition to the state method, there also the entityState method. This method allows developers to change the state of an entity object using the available methods of that entity. It takes a closure as an argument, which should accept the entity as an argument and should return the modified entity. This allows developers to take full advantage of the object-oriented nature of their entities and use the methods that are already defined on the entity to change its state. |
204 | 205 |
|
205 | | -Can also be used in same manner as [Laravel trashed states](https://laravel.com/docs/10.x/eloquent-factories#trashed-state) |
| 206 | +Can also be used in same manner as <ExternalLink href="https://laravel.com/docs/10.x/eloquent-factories#trashed-state">Laravel trashed states</ExternalLink> |
206 | 207 |
|
207 | 208 | ```php |
208 | 209 |
|
|
0 commit comments