guillen / tasks
My first Laravel component, just for learn
dev-master
2019-02-05 23:47 UTC
Requires
- php: >=7.1
- illuminate/contracts: ^5.7
- illuminate/database: ^5.7
- illuminate/http: ^5.7
- illuminate/support: ^5.7
Requires (Dev)
- mockery/mockery: ^1.2
- phpunit/phpunit: 7
This package is not auto-updated.
Last update: 2024-05-10 06:06:23 UTC
README
Install
composer require guillen/tasks
Register
In your config/app.php
add Service Provider
Lungo\Task\TaskServiceProvider::class,
Register Routes
In your app/Providers/RouteServiceProvider.php
file, add routes on map method
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
RouteRegister::routes();//add here
}
Run migrations
php artisan migrate
How to use
RouteRegister
class create 2 RESTFull routes:
- GET \lungo\task: List all task in database
- POST \lungo\task: Create a task sending
name
anddescription
Model
You can use Lungo\Task\Database\Task
model for extend functionality. It is a normal Eloquent Model.