-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* H5PRepository WIP * fix * fix * possible fix * transaction fix Co-authored-by: Tomasz Smolarek <tomasz.smolarek@escolasoft.com>
- Loading branch information
Showing
9 changed files
with
344 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace EscolaLms\HeadlessH5P\Database\Factories; | ||
|
||
use EscolaLms\HeadlessH5P\Models\H5PLibrary; | ||
use EscolaLms\HeadlessH5P\Models\H5PLibraryDependency; | ||
use Illuminate\Database\Eloquent\Factories\Factory; | ||
|
||
class H5PLibraryDependencyFactory extends Factory | ||
{ | ||
protected $model = H5PLibraryDependency::class; | ||
|
||
public function definition() | ||
{ | ||
return [ | ||
'library_id' => H5PLibrary::factory(), | ||
'required_library_id' => H5PLibrary::factory(), | ||
'dependency_type' => $this->faker->randomElement(['editor', 'preloaded']) | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ public function definition() | |
'semantics' => '', | ||
'tutorial_url' => '', | ||
'has_icon' => 0, | ||
'add_to' => '' | ||
]; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
database/migrations/2022_08_10_112954_add_add_to_column_to_hh5p_libraries_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up() | ||
{ | ||
Schema::table('hh5p_libraries', function (Blueprint $table) { | ||
$table->text('add_to')->nullable(); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::table('hh5p_libraries', function (Blueprint $table) { | ||
$table->dropColumn('add_to'); | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.