-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: change project for used taiwind css in admin painel with te…
…mplate. é web used materialcss
- Loading branch information
Showing
87 changed files
with
17,862 additions
and
1,248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace App\Http\Resource\User; | ||
|
||
use App\Http\Resource\User\UserResource; | ||
use App\Supports\Resources\ResourceCollection; | ||
|
||
class UserCollection extends ResourceCollection | ||
{ | ||
public function toArray() | ||
{ | ||
return [ | ||
'data' => UserResource::collection($this->collection), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace App\Http\Resource\User; | ||
|
||
use App\Supports\Resources\JsonResource; | ||
|
||
class UserResource extends JsonResource | ||
{ | ||
public function toArray() | ||
{ | ||
return [ | ||
'id' => $this->id, | ||
'full_name' => "{$this->first_name} {$this->last_name}", | ||
'first_name' => $this->first_name, | ||
'last_name' => $this->last_name, | ||
'email' => $this->email, | ||
'created_at' => $this->created_at, | ||
'updated_at' => $this->updated_at | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use App\Supports\Model\Model as Model; | ||
|
||
class User extends Model | ||
{ | ||
protected string $table = 'users'; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function fullName(): string | ||
{ | ||
return "{$this->first_name} {$this->last_name}"; | ||
} | ||
|
||
|
||
// /** | ||
// * @return bool | ||
// */ | ||
// public function save(): bool | ||
// { | ||
// if (!$this->required()) { | ||
// $this->message->warning("Nome, sobrenome, email e senha são obrigatórios"); | ||
// return false; | ||
// } | ||
|
||
// if (!is_email($this->email)) { | ||
// $this->message->warning("O e-mail informado não tem um formato válido"); | ||
// return false; | ||
// } | ||
|
||
// if (!is_passwd($this->password)) { | ||
// $min = CONF_PASSWD_MIN_LEN; | ||
// $max = CONF_PASSWD_MAX_LEN; | ||
// $this->message->warning("A senha deve ter entre {$min} e {$max} caracteres"); | ||
// return false; | ||
// } else { | ||
// $this->password = passwd($this->password); | ||
// } | ||
|
||
// /** User Update */ | ||
// if (!empty($this->id)) { | ||
// $userId = $this->id; | ||
|
||
// if ($this->find("email = :e AND id != :i", "e={$this->email}&i={$userId}", "id")->fetch()) { | ||
// $this->message->warning("O e-mail informado já está cadastrado"); | ||
// return false; | ||
// } | ||
|
||
// $this->update($this->safe(), "id = :id", "id={$userId}"); | ||
// if ($this->fail()) { | ||
// $this->message->error("Erro ao atualizar, verifique os dados"); | ||
// return false; | ||
// } | ||
// } | ||
|
||
// /** User Create */ | ||
// if (empty($this->id)) { | ||
// if ($this->findByEmail($this->email, "id")) { | ||
// $this->message->warning("O e-mail informado já está cadastrado"); | ||
// return false; | ||
// } | ||
|
||
// $userId = $this->create($this->safe()); | ||
// if ($this->fail()) { | ||
// $this->message->error("Erro ao cadastrar, verifique os dados"); | ||
// return false; | ||
// } | ||
// } | ||
|
||
// $this->data = ($this->findById($userId))->data(); | ||
// return true; | ||
// } | ||
} |
Empty file.
Oops, something went wrong.