You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
600 B
25 lines
600 B
<?php
|
|
|
|
namespace App\Http\Resources\Mobile;
|
|
|
|
/**
|
|
* Authenticated mobile representation.
|
|
*
|
|
* This is intentionally not used by the anonymous endpoints until optional
|
|
* mobile authentication is explicitly enabled and tested. It documents the
|
|
* boundary for future authenticated course APIs.
|
|
*/
|
|
class AuthenticatedCourseResource extends PublicCourseResource
|
|
{
|
|
public function toArray($request)
|
|
{
|
|
$data = parent::toArray($request);
|
|
$data['my_user'] = $this->when(
|
|
isset($this->my_user),
|
|
(int) $this->my_user
|
|
);
|
|
|
|
return $data;
|
|
}
|
|
}
|