devto-for-laravel maintained by ronildo-sousa
Description
A service wrapper around the Dev.to
Author
Last update
2023/05/20 02:04
(dev-main)
License
Downloads
4
Tags
Dev.to for Laravel
A service wrapper around the Dev.to API
🛠️ In progress
Installation
You can install the package via composer:
composer require ronildo-sousa/devto-for-laravel
Usage
See the documentation for details
Published articles
This allows the client to retrieve a list of articles.
DevtoForLaravel::articles()
->get();
you have some options like:
Pagination
DevtoForLaravel::articles()
->perPage(5)
->get();
Filters
DevtoForLaravel::articles()
->withTags(['tag1', 'tag2'])
->withoutTags(['tag3', 'tag4'])
->get();
DevtoForLaravel::articles()
->from('username')
->get();
Sort articles
This allows to retrieve a list of articles. ordered by descending publish date.
DevtoForLaravel::articles()
->latest()
->get();
Find by ID
you can get an article by id:
DevtoForLaravel::articles()
->find(258)
Testing
composer test
Credits
License
The MIT License (MIT). Please see License File for more information.