Laravel-Backpack / NewsCRUD

An admin panel for news with categories and tags, using Backpack CRUD on Laravel 10
http://backpackforlaravel.com
Other
233 stars 51 forks source link

Author and social media #49

Closed GrnPero closed 3 years ago

GrnPero commented 3 years ago

References Issues/PRs

None

What does this implement/fix? Explain your changes.

I added the ability for the NewsCRUD have an Author in the database and Social Media URL which could be implemented in the front-end for example:

<p><a href="https://{{ $article->socialmedia }}">{{ $article->author }}</a><p>

Any other comments?

Social Media is optional in the Admin panel. I made changes to the Migration, Model, Request, and Controller files.

welcome[bot] commented 3 years ago

BOOM! Your first PR with us, thank you so much! Someone will take a look at it shortly.

Please keep in mind that:

Thank you!

-- Justin Case The Backpack Robot

pxpm commented 3 years ago

Hello @GrnPero

Thank you for your submission.

I don't think we should be adding more stuff to this package. It's just a starter package.

In my understanding of it, author should be setup by backpack_user() or smt not an text field so user can input the author. Also I think that social media belongs to author information and not the article information.

That said, I am going to leave this open and postpone it to review in 4.2, if more people asks about it, we could make something work, but I don't think this is the way to go.

Anyway, I would like to thank you, it surelly would help someone that wants to do the same in the meanwhile.

Wish you the best, Pedro

GrnPero commented 3 years ago

Hello @GrnPero

Thank you for your submission.

I don't think we should be adding more stuff to this package. It's just a starter package.

In my understanding of it, author should be setup by backpack_user() or smt not an text field so user can input the author. Also I think that social media belongs to author information and not the article information.

That said, I am going to leave this open and postpone it to review in 4.2, if more people asks about it, we could make something work, but I don't think this is the way to go.

Anyway, I would like to thank you, it surelly would help someone that wants to do the same in the meanwhile.

Wish you the best, Pedro

I didn't know we could implement that with backpack_user(), would it work if there was multiple backpack_users? Would we have to add that information to the user database? That sounds like an interesting way of doing things.