@@ -153,15 +153,15 @@ the thinnest controllers ever! Here's an example of generating a feature and ser
153
153
> You might want to [ Setup] ( #setup ) to be able to use the ` lucid ` command.
154
154
155
155
> IMPORTANT! You need at least one service to be able to host your features. In this example we are using the Api
156
- service generated previously, refered to as ` api ` in the commands.
156
+ service generated previously, referred to as ` api ` in the commands.
157
157
158
158
```
159
159
lucid make:feature SearchUsers api
160
160
```
161
161
162
162
And we will have ` src/Services/Api/Features/SearchUsersFeature.php ` and its test ` src/Services/Api/Tests/Features/SearchUsersFeatureTest.php ` .
163
163
164
- Inside the Feature class there's a ` handle ` method which is the method that will be called when we dispatch that feature,
164
+ Inside the Feature class, there's a ` handle ` method which is the method that will be called when we dispatch that feature,
165
165
and it supports dependency injection, which is the perfect place to define your dependencies.
166
166
167
167
Now we need a controller to serve that feature:
@@ -348,11 +348,11 @@ Value Objects and anything that has to do with data (algorithms etc.).
348
348
349
349
## Foundation
350
350
This is a place for foundational elements that act as the most abstract classes that do not belong in any of the
351
- components, currenly holds the ` ServiceProvider ` which is the link between the services and the framework (Laravel).
351
+ components, currently holds the ` ServiceProvider ` which is the link between the services and the framework (Laravel).
352
352
You might never need or use this directory for anything else, but in case you encountered a case where a class
353
353
needs to be shared across all components and does belong in any, feel free to use this one.
354
354
355
- Every service must be registered inside the foundation's service provider after being created for laravel to know about it,
355
+ Every service must be registered inside the foundation's service provider after being created for Laravel to know about it,
356
356
simply add ` $this->app->register([service name]ServiceProvider::class); ` to the ` register ` methods of the
357
357
foundation's ` ServiceProvider ` . For example, with an Api Service:
358
358
@@ -368,7 +368,7 @@ public function register()
368
368
369
369
## Getting Started
370
370
This project ships with the [ Lucid Console] ( https://github.com/lucid-architecture/laravel-console ) which provides an interactive
371
- user interface and a command line interface that are useful for scaffolding and exploring Services, Features and Jobs.
371
+ user interface and a command line interface that are useful for scaffolding and exploring Services, Features, and Jobs.
372
372
373
373
### Setup
374
374
The ` lucid ` executable will be in ` vendor/bin ` . If you don't have ` ./vendor/bin/ ` as part of your ` PATH ` you will
@@ -417,7 +417,7 @@ src/Services/Api
417
417
└── resources # Assets, Lang and Views
418
418
```
419
419
420
- One more step is required for Laravel to recognise the service we just created.
420
+ One more step is required for Laravel to recognize the service we just created.
421
421
422
422
#### Register Service
423
423
@@ -434,7 +434,7 @@ lucid make:feature ListUsers api
434
434
435
435
##### UI
436
436
437
- Using on of the methods above, the new Feature can be found at ` src/Services/Api/Features/ListUsersFeature.php ` .
437
+ Using one of the methods above, the new Feature can be found at ` src/Services/Api/Features/ListUsersFeature.php ` .
438
438
Now you can fill up a bunch of jobs in its ` handle ` method.
439
439
440
440
### 3. Create a Job
@@ -447,7 +447,7 @@ lucid make:job GetUsers user
447
447
448
448
##### UI
449
449
450
- Using on of the methods above, the new Job can be found at ` src/Domains/User/Jobs/GetUsers ` and now you can fill
450
+ Using one of the methods above, the new Job can be found at ` src/Domains/User/Jobs/GetUsers ` and now you can fill
451
451
it with functionality in the ` handle ` method. For this example we will just add a static ` return ` statement:
452
452
453
453
``` php
@@ -478,7 +478,7 @@ public function handle(Request $request)
478
478
```
479
479
480
480
The ` RespondWithJsonJob ` is one of the Jobs that were shipped with this project, it lives in the ` Http ` domain and is
481
- used to respond to a request in structured JSON format.
481
+ used to respond to a request in a structured JSON format.
482
482
483
483
##### Serve The Feature
484
484
To be able to serve that Feature we need to create a route and a controller that does so.
@@ -513,15 +513,15 @@ Route::get('/users', 'UserController@get');
513
513
Now if you visit ` /api/users ` you should see the JSON structure.
514
514
515
515
## Microservices
516
- If you have been hearing about microservices lately, and wondering how that works and would like plan your next project
516
+ If you have been hearing about microservices lately, and wondering how that works and would like to plan your next project
517
517
based on microservices, or build your application armed and ready for the shift when it occurs, Lucid is your best bet.
518
518
It has been designed with scale at the core and the microservice transition in mind, it is no coincidence that the
519
519
different parts of the application that will (most probably) later on become the different services with the microservice
520
- architecture, are called ** Service** . However, [ it is recommended] ( http://martinfowler.com/bliki/MonolithFirst.html )
520
+ architecture are called ** Service** . However, [ it is recommended] ( http://martinfowler.com/bliki/MonolithFirst.html )
521
521
that only when your monolith application grow so large that it becomes crucial to use microservices for the sake of
522
522
the progression and maintenance of the project, to do the shift; because once you've built your application using Lucid,
523
523
the transition to a microservice architecture will be logically simpler to plan and physically straight-forward
524
524
to implement. There is a [ microservice counterpart] ( https://github.com/lucid-architecture/laravel-microservice )
525
525
to Lucid that you can check out [ here] ( https://github.com/lucid-architecture/laravel-microservice ) .
526
526
527
- With more on the means of transitioning from a monolith to a microservice
527
+ With more on the means of transitioning from a monolith to a microservice.
0 commit comments