Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 41 additions & 57 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions config/asseco-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* UUIDs as primary keys.
*/
'uuid' => false,
'uuid' => false,

/**
* Timestamp types.
Expand All @@ -30,11 +30,11 @@
* Should the package run the migrations. Set to false if you're publishing
* and changing default migrations.
*/
'run' => true,
'run' => true,
],

'routes' => [
'prefix' => 'api',
'prefix' => 'api',
'middleware' => ['api'],
],
];
6 changes: 3 additions & 3 deletions src/App/Http/Requests/TagManyRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public function authorize()
public function rules()
{
return [
'model' => 'required|string',
'ids' => 'required|array',
'tag_ids' => 'required|array',
'model' => 'required|string',
'ids' => 'required|array',
'tag_ids' => 'required|array',
'tag_ids.*' => 'exists:tags,id',
];
}
Expand Down
4 changes: 2 additions & 2 deletions src/App/Http/Requests/TagRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public function authorize()
public function rules()
{
return [
'name' => 'required|string|max:50|unique:tags,name' . ($this->tag ? ',' . $this->tag->id : null),
'is_system' => 'boolean',
'name' => 'required|string|max:50|unique:tags,name' . ($this->tag ? ',' . $this->tag->id : null),
'is_system' => 'boolean',
'color' => 'nullable|string|max:30',
];
}
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Factories/TagFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public function modelName()
public function definition()
{
return [
'name' => substr($this->faker->unique()->sentence(3, true), 0, 50),
'is_system' => $this->faker->boolean(25),
'name' => substr($this->faker->unique()->sentence(3, true), 0, 50),
'is_system' => $this->faker->boolean(25),
'color' => $this->faker->hexColor,
];
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/Http/Controllers/TagControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function creates_tag()
$this
->postJson(route('tags.store'), $request)
->assertJsonFragment([
'id' => 1,
'id' => 1,
'name' => $request['name'],
'color' => $request['color'],
]);
Expand Down
Loading