2018-10-21 00:26:21 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
2019-04-25 13:33:03 +02:00
|
|
|
use App\Filters\UserFilters;
|
2018-10-24 12:24:09 +02:00
|
|
|
use App\Http\Controllers\Traits\VerifiesUserEmail;
|
2019-04-25 13:33:03 +02:00
|
|
|
use App\Models\User;
|
|
|
|
use App\Transformers\UserTransformer;
|
|
|
|
use App\Utils\Traits\MakesHash;
|
2018-10-21 00:26:21 +02:00
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
2019-01-27 00:22:57 +01:00
|
|
|
/**
|
|
|
|
* Class UserController
|
|
|
|
* @package App\Http\Controllers
|
|
|
|
*/
|
2019-03-28 22:34:58 +01:00
|
|
|
class UserController extends BaseController
|
2018-10-21 00:26:21 +02:00
|
|
|
{
|
2018-10-24 12:24:09 +02:00
|
|
|
use VerifiesUserEmail;
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2019-04-25 13:33:03 +02:00
|
|
|
use MakesHash;
|
|
|
|
|
|
|
|
protected $entity_type = User::class;
|
|
|
|
|
|
|
|
protected $entity_transformer = UserTransformer::class;
|
|
|
|
|
2019-03-28 22:34:58 +01:00
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
|
|
|
|
parent::__construct();
|
2018-10-21 00:26:21 +02:00
|
|
|
|
2019-03-28 22:34:58 +01:00
|
|
|
}
|
2019-04-25 13:33:03 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Display a listing of the resource.
|
|
|
|
*
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
*/
|
|
|
|
public function index(UserFilters $filster)
|
|
|
|
{
|
|
|
|
$users = User::filter($filters);
|
|
|
|
|
|
|
|
return $this->listResponse($users);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Show the form for creating a new resource.
|
|
|
|
*
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
*/
|
|
|
|
public function create()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Store a newly created resource in storage.
|
|
|
|
*
|
|
|
|
* @param \Illuminate\Http\Request $request
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
*/
|
|
|
|
public function store(Request $request)
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Display the specified resource.
|
|
|
|
*
|
|
|
|
* @param int $id
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
*/
|
|
|
|
public function show($id)
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Show the form for editing the specified resource.
|
|
|
|
*
|
|
|
|
* @param int $id
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
*/
|
|
|
|
public function edit($id)
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Update the specified resource in storage.
|
|
|
|
*
|
|
|
|
* @param \Illuminate\Http\Request $request
|
|
|
|
* @param int $id
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
*/
|
|
|
|
public function update(Request $request, $id)
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove the specified resource from storage.
|
|
|
|
*
|
|
|
|
* @param int $id
|
|
|
|
* @return \Illuminate\Http\Response
|
|
|
|
*/
|
|
|
|
public function destroy($id)
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
2018-10-21 00:26:21 +02:00
|
|
|
}
|