Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
472dc13
modelos criados e migrations
HelioDantas Jan 22, 2019
ffaa353
mudança nas pasta e CursoController
HelioDantas Jan 22, 2019
79dcda3
buscar por id e paginação no backEnd ok
HelioDantas Jan 22, 2019
f687822
buscar por todos os professores e salas
HelioDantas Jan 22, 2019
ceb415e
metodo post e put ok no backend
HelioDantas Jan 22, 2019
fc0016c
limpeza na rota
HelioDantas Jan 22, 2019
925d06a
Merge branch 'master' of https://github.com/HelioDantas/desafio-fulls…
HelioDantas Jan 22, 2019
ab29a24
deleçãp de curso e tratamento de exption
HelioDantas Jan 22, 2019
315496e
exception em json
HelioDantas Jan 22, 2019
3099d56
criação do front e validate de requição
HelioDantas Jan 23, 2019
0c60a4e
criações dos modulos auth e curso, componetes e service do curso
HelioDantas Jan 23, 2019
37ad703
Modificação no Handle
HelioDantas Jan 23, 2019
35b2b35
dependencia do bootstrap
HelioDantas Jan 23, 2019
af4b59a
tela de cursos com seus card e botões
HelioDantas Jan 23, 2019
8e23b9d
tela de cursos criada
HelioDantas Jan 23, 2019
ba3e482
metodo lista curso
HelioDantas Jan 23, 2019
828c5d6
metodo lista cursos
HelioDantas Jan 23, 2019
e6653a7
delete
HelioDantas Jan 23, 2019
7c2621c
telas de detalhe layout responsivo ok, problemas em relação ao seleto…
HelioDantas Jan 24, 2019
ab1b3b7
delete e ver
HelioDantas Jan 26, 2019
6a20531
resouces criado de professor e sala
HelioDantas Jan 26, 2019
5ccdff4
mostrar a sala e profesor
HelioDantas Jan 26, 2019
a80573b
concertando erro do resouces
HelioDantas Jan 26, 2019
25f152e
model curso
HelioDantas Jan 26, 2019
bcccbbc
Coars erro no post concertado e resouces no metodo para buscar todos …
HelioDantas Jan 27, 2019
c0dc54d
select com multiplo valores dropdown está ok o problema estava no imp…
HelioDantas Jan 27, 2019
4b32cc2
limpeza no componente retirando metodos de teste
HelioDantas Jan 27, 2019
2878e79
tela de login
HelioDantas Jan 27, 2019
bddf866
botao preto
HelioDantas Jan 27, 2019
8f6c090
autenticação simples feita no backEnd
HelioDantas Jan 27, 2019
2d7b995
options ok ao enviar readers com o token
HelioDantas Jan 28, 2019
3cc3765
projeto finalizado
HelioDantas Jan 28, 2019
4ca65c8
projeto finalizado
HelioDantas Jan 28, 2019
5393b02
projeto finalizado2
HelioDantas Jan 28, 2019
3c6e1ad
projeto finalizado2
HelioDantas Jan 28, 2019
42829ff
projeto finalizado2
HelioDantas Jan 28, 2019
cea8a6f
projeto finalizado2
HelioDantas Jan 28, 2019
f7e2f98
env
HelioDantas Jan 28, 2019
16eead4
readme
HelioDantas Jan 28, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions BackEnd/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
39 changes: 39 additions & 0 deletions BackEnd/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:afrgI7yR9k0G4qzNlXXowQ/fHVX2AKDEvY9MnXF+ty8=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=desafio-fullstack
DB_USERNAME=root
DB_PASSWORD=hl2468hl

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
5 changes: 5 additions & 0 deletions BackEnd/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
11 changes: 11 additions & 0 deletions BackEnd/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor

.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
42 changes: 42 additions & 0 deletions BackEnd/app/Console/Kernel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];

/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
}

/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');

require base_path('routes/console.php');
}
}
59 changes: 59 additions & 0 deletions BackEnd/app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php

namespace App\Exceptions;
use Illuminate\Validation\ValidationException;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Ramsey\Uuid\Provider\Node\FallbackNodeProvider;

class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];

/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];

/**
* Report or log an exception.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);
}

/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{

//return parent::render($request, $exception);

return response()->json([
'erro'=> $exception->getMessage(),
'dado' => $request->all() ], 404);
}
}


32 changes: 32 additions & 0 deletions BackEnd/app/Http/Controllers/Auth/ForgotPasswordController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;

class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset emails and
| includes a trait which assists in sending these notifications from
| your application to your users. Feel free to explore this trait.
|
*/

use SendsPasswordResetEmails;

/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
54 changes: 54 additions & 0 deletions BackEnd/app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use phpDocumentor\Reflection\DocBlock\Description;

class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/

use AuthenticatesUsers;

/**
* Where to redirect users after login.
*
* @var string
*/
// protected $redirectTo = '/home';

/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
// $this->middleware('guest')->except('logout');
}

public function login(Request $request) {

$email = $request->only('email');
$senha = $request->only('password');
$senha = md5($senha);
$user = User::where('email', $email);
if($user->password == $senha) {
$token = sha1(time());
return response(['token'=> $token], 200);
}else {
return response('senha invalida', 404);
}
}
}
72 changes: 72 additions & 0 deletions BackEnd/app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php

namespace App\Http\Controllers\Auth;

use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;

class RegisterController extends Controller
{
/*
|--------------------------------------------------------------------------
| Register Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users as well as their
| validation and creation. By default this controller uses a trait to
| provide this functionality without requiring any additional code.
|
*/

use RegistersUsers;

/**
* Where to redirect users after registration.
*
* @var string
*/
protected $redirectTo = '/home';

/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}

/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'string', 'min:6', 'confirmed'],
]);
}

/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return \App\User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
}
}
39 changes: 39 additions & 0 deletions BackEnd/app/Http/Controllers/Auth/ResetPasswordController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;

class ResetPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/

use ResetsPasswords;

/**
* Where to redirect users after resetting their password.
*
* @var string
*/
protected $redirectTo = '/home';

/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
Loading