Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#13 - Basic CRUD for tests #18

Merged
merged 24 commits into from
Aug 13, 2024
Merged

#13 - Basic CRUD for tests #18

merged 24 commits into from
Aug 13, 2024

Conversation

AmonDeShir
Copy link
Collaborator

@AmonDeShir AmonDeShir commented Aug 12, 2024

Should close #13 and close #17.

  • Created CRUD operations for tests, questions, and answers.
  • Implemented functionality to duplicate existing tests, questions, and answers.

app/Http/Middleware/HandleInertiaRequests.php Outdated Show resolved Hide resolved
app/Http/Middleware/HandleInertiaRequests.php Outdated Show resolved Hide resolved
app/Http/Middleware/HandleInertiaRequests.php Outdated Show resolved Hide resolved
app/Http/Controllers/QuizController.php Outdated Show resolved Hide resolved
resources/js/Pages/Answer/Index.vue Show resolved Hide resolved
tests/Feature/QuestionTest.php Outdated Show resolved Hide resolved
Comment on lines 19 to 27
public static function middleware()
{
return [
new Middleware("can:create," . Answer::class . ",question", only: ["store"]),
new Middleware("can:clone,answer,question", only: ["clone"]),
new Middleware("can:update,answer", only: ["update", "markAsCorrect", "markAsInvalid"]),
new Middleware("can:delete,answer", only: ["destroy"]),
];
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it needed here?

Comment on lines 19 to 25
public static function middleware()
{
return [
new Middleware("can:update,quiz", only: ["update"]),
new Middleware("can:delete,quiz", only: ["destroy"]),
];
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Comment on lines 19 to 27
public static function middleware()
{
return [
new Middleware("can:create," . Question::class . ",quiz", only: ["store"]),
new Middleware("can:clone,question,quiz", only: ["clone"]),
new Middleware("can:update,question", only: ["update"]),
new Middleware("can:delete,question", only: ["destroy"]),
];
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here

Comment on lines 19 to 22
*
* @property bool $isLocked
* @property bool $isCorrect
*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*
* @property bool $isLocked
* @property bool $isCorrect
*
* @property bool $isLocked
* @property bool $isCorrect

@AmonDeShir AmonDeShir merged commit ef852c0 into main Aug 13, 2024
3 checks passed
@AmonDeShir AmonDeShir deleted the 13-basic-crud-for-tests branch August 13, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Admin should have possibility to duplicate tests Basic CRUD for tests
2 participants