Download the PHP package mouadbnl/laravel-judge0 without Composer
On this page you can find all versions of the php package mouadbnl/laravel-judge0. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mouadbnl/laravel-judge0
More information about mouadbnl/laravel-judge0
Files in mouadbnl/laravel-judge0
Package laravel-judge0
Short Description Support for Judge0 API to run/judge code in different languages
License MIT
Informations about the package laravel-judge0
Laravel Judge0
Judge0 API integration for running/judging
code with different languages
Installation
You can install the package via composer:
You can publish and run the migrations with:
You can publish the config file with:
Usage
First add trait to the User Model.
This create a polymorphique relationship between the User model and the Submission model provided by this package. You can let the User make a submission using the follwing code:
Define the API to use
This package provides two drivers to connect to judge0 API
Instance Driver
This allows you to connect to a judge0 Docker instance. to do so please define the JUDGE0_BASE_URI
which is the url to your instance and JUDGE0_KEY
which it the API key to authenticate in your environment variables
or .env
file.
Rapidapi Driver
This allows you to connect to the the Judge0 app on RapidAPI.
For this you need to define the following in your environment variables
or .env
file.
JUDGE0_RAPIDAPI_BASE_URI
the rapidapi url to make the requests to, which it by defaulthttps://judge0-ce.p.rapidapi.com
.JUDGE0_RAPIDAPI_HOST
, by default it isjudge0-ce.p.rapidapi.com
.JUDGE0_RAPIDAPI_KEY
yout rapidapi key.
Testing
Credits
- Mouad Benali
- Spatie For the skeleton and Package Training
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-judge0 with dependencies
guzzlehttp/guzzle Version ^7
illuminate/auth Version ^6.0|^7.0|^8.0
illuminate/contracts Version ^6.0|^7.0|^8.0
illuminate/support Version ^8.0