Releases: dcblogdev/laravel-microsoft-graph
Releases · dcblogdev/laravel-microsoft-graph
v3.1.9
Better token retrivel for MsGraphAdmin
What's Changed
- Rewrote MsGraphAdmin token methods by @ChrisToxz in #44
New Contributors
- @ChrisToxz made their first contribution in #44
Full Changelog: v3.1.7...v3.1.8
changed migration to anonymous migration
v3.1.7 changed migration to anonymous migration
add support for Laravel 10
Merge pull request #47 from laravel-shift/l10-compatibility Laravel 10.x Compatibility
v3.1.5
Added
- added commands
msgraphadmin:keep-alive
andmsgraph:keep-alive
to allow refresh tokens to be automated by running these commands on a schedule - added support in Files.php to support replace/rename behavior on
createFolder
and fileupload
functions. Default behavior is to rename.
Usage for createFolder:
MsGraph::files()->createFolder($name, $path, $type = 'me', $behavior='rename')
Where $behavior is either rename or replace
Usage for upload:
MsGraph::files()->upload($name, $uploadPath, $path=null, $type='me',$behavior='rename')
Where $behavior is either rename or replace
v3.1.4
Added
- Test foundation using PestPHP
- PHP code sniffer fixer and style config
Changed
MSGRAPH_DB_CONNECTION
to be mysql to use a connection called mysql- Store name is email cannot be found when connecting
- Changed responses so if the data is json it gets decoded otherwise the raw body is returned
Msgraph::emails->get($folderId, $params)
returns error when mailbox folder not found
Fixed
- used MsGraphAdmin instead of MsGraph in admin files resource
Added missing files import
v3.1.3 updated change log
added support for Laravel 9
v3.1.2 updated change log
updated getPagination method on MsGraph.php
Changed getPagination() to return array containing only previous and next page numbers.
This method needs the data but also the total number of records, the limit ($top) and the offset ($skip)
$limit = 5;
$skip = request('next', 0);
$messageQueryParams = [
"\$orderby" => "displayName",
"\$count" => "true",
"\$skip" => $skip,
"\$top" => $limit,
];
$contacts = MsGraph::get('me/contacts?'.http_build_query($messageQueryParams));
$total = $contacts['@odata.count'] ?? 0;
$response = MsGraph::getPagination($contacts, $total, $limit, $skip);
$previous = $response['previous'];
$next = $response['next'];
The in a view the previous and next links can be displayed:
@if (request('next') > 0)
<a href='{{ url()->current().'?next='.$previous }}'>Previous Page</a>
@endif
@if ($next != 0)
<a href='{{ url()->current().'?next='.$next }}'>Next Page</a>
@endif
MsGraphAdmin classes for calendar
Added classes for MsGraphAdmin for working with Calendars and Events
Calendar Events
MsGraphAdmin::calendarEvents()->userid($userId)->get();
MsGraphAdmin::calendarEvents()->userid($userId)->find($calendarId, $eventId);
MsGraphAdmin::calendarEvents()->userid($userId)->store($calendarId, $data);
Calendars
MsGraphAdmin::calendars()->userid($userId)->get();
MsGraphAdmin::calendars()->userid($userId)->find($eventId);
MsGraphAdmin::calendars()->userid($userId)->store($data);
MsGraphAdmin::calendars()->userid($userId)->update($data);
Events
MsGraphAdmin::events()->userid($userId)->get();
MsGraphAdmin::events()->userid($userId)->find($eventId);
MsGraphAdmin::events()->userid($userId)->store($data);
MsGraphAdmin::events()->userid($userId)->update($data);
MsGraphAdmin::events()->userid($userId)->delete($data);