lucidarch / laravel

[DEPRECATED] See https://github.com/lucidarch/lucid

Home Page:https://lucidarch.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New way of installing Lucid

undjike opened this issue · comments

N.B. There's a change coming next month to the way you install Lucid into a project which will get us rid of waiting for an upgrade of this boilerplate. It will be as simple as composer require lucid-arch/cli then lucid init which can be run into an existing project as well!

Hi @Mulkave , please can you tell us when this way of installing Lucid will be available ?

@undjike thanks for asking, it is scheduled for the end of this month. A lot of it has already been worked at https://github.com/lucid-architecture/lucid and the new home for docs is https://docs.lucidarch.dev (still work in progress, will be done end of this week).

I will let you know of all the changes that came with this release, it is very exciting! And much easier to use and maintain.

So glad. I stay tuned for news.

That new documentation is very amazing at the first look. I'll take time on it as soon as possible.

Hello @Mulkave, I've fully read the new documentation and I want to congratulate the team for the outstanding work.

Nevertheless, I have a minor question or two.

  • Is it not necessary to implement API Resources as Laravel does (php artisan make:resource) ?
  • Is there any recommendation concerning API Versioning ?

Hey @undjike

  • Sorry i didn't understand what you mean with this question. All lucid "make" commands are under the make:* namespace:
make
  make:controller             Create a new resource Controller class in a service
  make:feature                Create a new Feature in a service
  make:job {--Q|queue}        Create a new Job in a domain
  make:migration              Create a new Migration class in a service
  make:model                  Create a new Eloquent Model.
  make:operation {--Q|queue}  Create a new Operation in a domain
  make:policy                 Create a Policy.
  make:request                Create a Request in a domain.
  make:service                Create a new Service
  • Nothing specific, no. It's a rather tricky matter that is dealt with differently depending on the case. Have you thought of the different options?

Hello @Mulkave

  • Yes, I'm aware of the existing make commands. I was wondering if it's not necessary to implement as well the make:resource as Laravel does... As I didn't see it in Lucid.

  • I don't know if it's the best way to handle it but, I think implementing Json Resources (with make:resource command) can be useful when versioning APIs. So that the logic will be to return Json Resources (as the versionable entity) instead of model instances.

Ah, i see. I'm sorry I'm personally not acquainted with Laravel Resources just yet, but would love to give it a try and see how to use that with Lucid. Added to the roadmap 👍

Have you succeeded in including them in a Lucid project yourself? Would love to learn more from you about it.

I think i just understood what you mean by that after seeing a friend's suggestion about a lucid make:resource that would generate features along with the controller and methods: lucidarch/lucid#11

Lovely, thank you!

Since this repository will now be archived in favour of https://github.com/lucidarch/lucid, please go ahead and continue the conversation in the linked discussion.

Cheers! 🎉