GithubHelp home page GithubHelp logo

laravel-9's Introduction

Instructions

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private fork by duplicating the repo is documented here.

For this assignment the commands are:

Create a bare clone of the repository.

git clone --bare [email protected]:autoklose/laravel-9.git Create a new private repository on Github and name it laravel-9.

Mirror-push your bare clone to your new repository.

Replace <your_username> with your actual Github username in the url below.

cd laravel-9.git git push --mirror [email protected]:<your_username>/laravel-9.git Remove the temporary local repository you created in step 1.

cd .. rm -rf laravel-9.git You can now clone your laravel-9 repository on your machine (in my case in the code folder).

cd ~/code git clone [email protected]:<your_username>/laravel-9.git


Coding task:

Send multiple emails asynchronously over an API in Laravel

Overview

  • Create an API that can send multiple emails asynchronously to specific users.
  • Store information about the email in Elasticsearch
  • Cache information about the email in Redis
  • Test the route

Note: Bonus requirements were also implemented

Points to be noted before running this sample

  1. "composer install" need to be run

  2. .env file needs to be added and updated with DB and MAIL related environment variables

  3. 'predis' client was used in this demo instead of default 'phpredis'. If you intend to use default redis client make sure to comment out 'Redis' alias in config/app.php (otherwise it will conflict with redis clients class)

  4. An 'api' guard (that uses 'token' driver) has been added in config/auth.php and the token is used as a URI parameter in the request api_token={{your_api_token}}

  5. In phpunit tests 'mysql' database has been used

  6. Because horizon has been used so following commands needs to be run because horizon related assets and service provider has not been committed

    php artisan horizon:install
    
  7. Following artisan commands need to be run:

     php artisan migrate
     php artisan db:seed (creates one user for testing in postman or some other client)
     php artisan horizon
     php artisan queue:work
    
  8. One command 'test' has been added in composer.json to run the test cases

    php artisan test
    

laravel-9's People

Contributors

naveedali8086 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.