Skip to content

Commit

Permalink
Add small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Braybrooke committed Aug 20, 2020
1 parent fec6f20 commit 355aef4
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 2 deletions.
Binary file added .phpintel/417e2388a62d948b4249cf7249d84be6
Binary file not shown.
Binary file added .phpintel/7de6a3eec856e0d05769a158727d5a0c
Binary file not shown.
Binary file added .phpintel/8fe0d7befeb3000f189fc2a16a3b3c28
Binary file not shown.
Binary file added .phpintel/index
Binary file not shown.
4 changes: 3 additions & 1 deletion config/snscommunicationrecords.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
return [
'record_class' => PurpleMountain\SNSCommunicationRecords\Models\SNSCommunicationRecord::class,

'to_class' => App\User::class
'to_class' => App\User::class,

'api_middleware' => ['auth:api']
];
2 changes: 1 addition & 1 deletion routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
| contains the "api" middleware group.
|
*/
Route::middleware('auth:api')->get('communication-records', 'SNSCommunicationRecordsController');
Route::middleware(config('snscommunicationrecords.api_middleware'))->get('communication-records', 'SNSCommunicationRecordsController');
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public function __invoke(Request $request)

return SNSCommunicationRecordResource::collection(
config('snscommunicationrecords.record_class')::with($request->with ?: [])
->orderByDesc('created_at')
->paginate()
);
}
Expand Down

0 comments on commit 355aef4

Please sign in to comment.