PHP Class Learner\Http\Controllers\Admin\UserController

Inheritance: extends BaseController
Exibir arquivo Open project: RryLee/learner.video

Protected Properties

Property Type Description
$users Learner\Repositories\UserRepositoryInterface User repository.

Public Methods

Method Description
__construct ( Learner\Repositories\UserRepositoryInterface $users ) Instance the UserRepositoryInterface.
activeUsers ( ) : Illuminate\Database\Eloquent\Collection | User[] Get all active users.
deleteUser ( integer $id ) : Illuminate\Http\JsonResponse Delete user from database.
notActiveUsers ( ) : Illuminate\Database\Eloquent\Collection | User[] Find all not active users paginated.
removeToTrash ( integer $id ) : Illuminate\Http\JsonResponse Remove user to trash.
restoreUser ( integer $id ) : Illuminate\Http\JsonResponse Restore the user.
toggleUserActive ( integer $id ) : Illuminate\Http\JsonResponse Toggle user active.
trashedUsers ( ) : Illuminate\Database\Eloquent\Collection | User[] Find all users in trash paginated.

Method Details

__construct() public method

Instance the UserRepositoryInterface.
public __construct ( Learner\Repositories\UserRepositoryInterface $users )
$users Learner\Repositories\UserRepositoryInterface

activeUsers() public method

admin/users get
public activeUsers ( ) : Illuminate\Database\Eloquent\Collection | User[]
return Illuminate\Database\Eloquent\Collection | Learner\Models\User[]

deleteUser() public method

admin/users/delete/{id} delete
public deleteUser ( integer $id ) : Illuminate\Http\JsonResponse
$id integer
return Illuminate\Http\JsonResponse

notActiveUsers() public method

admin/users/notActive get
public notActiveUsers ( ) : Illuminate\Database\Eloquent\Collection | User[]
return Illuminate\Database\Eloquent\Collection | Learner\Models\User[]

removeToTrash() public method

admin/users/remove/{id} delete
public removeToTrash ( integer $id ) : Illuminate\Http\JsonResponse
$id integer
return Illuminate\Http\JsonResponse

restoreUser() public method

users/restore/{id} put
public restoreUser ( integer $id ) : Illuminate\Http\JsonResponse
$id integer
return Illuminate\Http\JsonResponse

toggleUserActive() public method

admin/users/toggleActive/{id} put
public toggleUserActive ( integer $id ) : Illuminate\Http\JsonResponse
$id integer
return Illuminate\Http\JsonResponse

trashedUsers() public method

admin/users/trashed get
public trashedUsers ( ) : Illuminate\Database\Eloquent\Collection | User[]
return Illuminate\Database\Eloquent\Collection | Learner\Models\User[]

Property Details

$users protected_oe property

User repository.
protected UserRepositoryInterface,Learner\Repositories $users
return Learner\Repositories\UserRepositoryInterface