Blogy project is based on laravel frame work..It has login and Registration forms for user with all restrictions on it, and the user can create a post, editing it and deleted it with some validations on all this process.
here you are using the validation two times, first in PostRequest class and second in the controller
why don't you just write all your validation rules in one place, as a best practice, in your PostRequest.
another note, use a separate request validation in store and update methods, to ensure the validation rules for each case
here you are using the validation two times, first in
PostRequest
class and second in the controller why don't you just write all your validation rules in one place, as a best practice, in yourPostRequest
.another note, use a separate request validation in store and update methods, to ensure the validation rules for each case
https://github.com/Ahmed-Abd-elhamid/Bloggy/blob/3823a89df6da622d8511a940da08b26ac2cb9b9a/app/Http/Controllers/PostController.php#L50-L53