Skip to content

Commit ac6b890

Browse files
committed
docs: correct mistakes in orm examples
1 parent e94f599 commit ac6b890

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/app/orm/migrations/migrations.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ <h4>Seeding the database</h4>
181181
&lcub;
182182
public function up(MigrationBuilder $builder): void
183183
&lcub;
184-
$roles = ['uncategorized', 'featured', 'events', 'news'];
185-
foreach ($roles as $id => $name) &lcub;
184+
$categories = ['uncategorized', 'featured', 'events', 'news'];
185+
foreach ($categories as $id => $name) &lcub;
186186
$builder->insertData('Category', [
187187
'Id' => ++$id,
188188
'Name' => $name

src/app/orm/start/start.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ <h3>Registering the EntityContext</h3>
207207
$builder->register(function ($services) use ($configuration) &lcub; //;
208208
// Adding EntityContext
209209
$services->addEntityContext(BlogContext::class,
210-
function ($options) &lcub;
210+
function ($options) use ($configuration) &lcub; //;
211211
$options->ProviderType = $configuration->getValue('Database:ProviderType');
212212
$options->ConnectionString = $configuration->getValue('Database:ConnectionString');
213213
&#125;

0 commit comments

Comments
 (0)