Prior to completing the module below it is highly recommended that you look at the following learning material: Even if you consider yourself a Lumen expert, there is material in the resources below that even seasoned users are not unaware of.
- Introducing Lumen
- Laravel 5 fundamentals - Lumen is based on Laravel, so some Lumen components are covered in this Laravel series
You're only building a sample application for the purpose of demonstrating knowledge of the various tools in Lumen. The application concept doesn't need to be something you'd want to show to the world.
- Create a new repository in your GitHub namespace called
Lumen-Test
, and commit all the work from this module there. - Build a Lumen application with the features, functions, entities etc of your choosing as long as the application meets the criteria below. Be creative and resourceful but at the same time don't take 10 years to build your app. This isn't an application you'll ship, focus on fulfilling the criteria to demonstrate your understanding of the framework components.
Application Criteria
When building your application and meeting a specific criteria below, you should use a relevant commit message to indicate that your commit is satisfying a particular criteria.
- Build your features using Test First Development. Don't write any feature code until the failing test is created first. 1) Write the test; 2) Write code to make it pass; 3) Refactor; 4) Rinse & Repeat. Keep in mind, however, that you CAN over-test your application. See Test like the TSA by DHH.
- Integrate sending email (with HTML and Plain Text versions of the email).
- All models should have validation. Between all models, make sure to use ALL of these validation rules at least once:
- Required
- Numeric
- Required If
- Regex
- Url
- Use a custom error message
- Custom validation rule
- Required
- All models should account for mass-assignment vulnerabilities by using the
fillable
orguarded
properties. - Make sure your application is protected from the following security vulnerabilities. The framework may or may not handle some of this for you, so verify to be sure.
- XSS
- SQL-Injection
- CSRF
- Session-Fixation
- Include a minimum of four different Entities (excluding lookups).
- Include the following relationships:
- At least 1 relationship for each model
- 1+ belongs to relationship
- 1+ has many relationship
- 1+ has one relationship
- 1+ has and belongs to many relationship
- 1+ polymorphic relationship
- CRUD interface for at least 1 model.
- Handle uploading an image that is a property of an entity. (Something like
$user->avatar
) - Include at least one 'resourceful' route and controller.
- Subscribe to at least one event. This can be a built-in event or a custom event you fire.
- Create at least one Facade.
- Use pagination at least once.
- Use 2+ Queues: one for sending email (in #5); and one custom queue.
- Use at least one query scope in your application.
- Implement at least one model policy
- Use at least one model factory for seeded data
When you are done, push your code to GitHub. Please create a tag called v1.8b
with a message of "ready for review"
. Be sure your tags are pushed to the remote repository and are visible in GitHub.
Create an issue titled Review Module 10b - Lumen PHP Framework and assign it to @generationtux-helmsmen.