Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
0.0.0.10
Browse files Browse the repository at this point in the history
Login Simplificado y CRUD para proyectos
  • Loading branch information
velosergio committed Nov 18, 2017
1 parent 54b5b5f commit caa5f07
Show file tree
Hide file tree
Showing 13 changed files with 229 additions and 58 deletions.
40 changes: 34 additions & 6 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,47 @@
▀▀▀▀▀▀▀▀▀▀

Todos los cambios notables de este proyecto estan documentadas en este archivo.
//Ejemplo
## [version estable.v-beta.v-alpha.cambio menor] - año-mes-dia
### Changed
### Fixed
### Added
### Removed

## [0.0.0.9] - 2017-11-16
## [0.0.0.10] - 2017-11-18
### Changed
- Datos personalizacion separados del Blinter Profile
- Ahora el registro viene en 3 fases
-- Primera Fase:
Registro de ID
eMail
Contraseña
-- Segunda Fase:
Registro de Primer Nombre
Segundo Nombre
Nick Name
Mensaje personal "opcional"
Biografia "Opcional"
Twitter
Facebook
Celular
DNI
-- Tercera Fase: Asignacion de 1 punto de atributo a todos los Skills

### Fixed
### Added
- BlinterProfileController: Controlador encargado de asignar las variables blinter profile y completar datos del usuario
- ProjectsController: Sistema para Crear, Leer, Actualizar, Eliminar - "CRUD"
- Tabla Projects: Almacena y gestiona informacion de los proyectos

### Removed

## [0.0.0.9] - 2017-11-16
### Fixed
- Formulario de Registro
- Bootstrap 4 CDN
- Barra de navegacion superior

### Added
### Removed

## [0.0.0.8] - 2017-11-14

### Changed
Expand All @@ -55,7 +85,6 @@ Todos los cambios notables de este proyecto estan documentadas en este archivo.
- El Campo [Username] es ahora unico
- Reparacion del login y register

### Added
### Removed
- Se elimino archivos por defecto del Frontend Scaffolding de laravel

Expand Down Expand Up @@ -137,7 +166,6 @@ Todos los cambios notables de este proyecto estan documentadas en este archivo.
## [0.0.0.1] 2017-10-25
### Added
- Registro e iniciacion de Variables

- Creacion Pagina de inicio con nombre de proyecto en la parte superior izquierda.
- Creacion base de datos Pami con tabla usuarios para el registro de usuarios
- Login: campos usuario, nombre, correo, contraseña con confirmacion.
Binary file added Doc/img5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions app/Http/Controllers/Auth/BlinterProfileController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

/* Blinter Profile Controller 0.1 - Modificado por ultima vez el 18/11/2017 */
namespace App\Http\Controllers\Auth;

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

class BlinterProfileController extends Controller
{
//
}
4 changes: 0 additions & 4 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ public function __construct()
protected function validator(array $data)
{
return Validator::make($data, [
'firtsname' => 'required|string|max:255',
'lastname' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:6|confirmed',
]);
Expand All @@ -61,8 +59,6 @@ protected function validator(array $data)
protected function create(array $data)
{
return User::create([
'firtsname' => $data['firtsname'],
'lastname' => $data['lastname'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
Expand Down
58 changes: 58 additions & 0 deletions app/Http/Controllers/ProjectsController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class ProjectsController extends Controller
{
//Crear Proyecto
public function create(Request $request){
//Creando Proyecto
$proyecto = new bproyecto();
//Definiendo Proyecto
$proyecto -> nombre = $request -> nombre;
$proyecto -> descripcion = $request -> descripcion;
$proyecto -> area = $request -> area;
//Guardando Proyecto
$proyecto -> save();
//Retorno
return redirect('/proyectos');
}
//Leer Proyecto
public function read(){
//Leer
$proyectos = bproyecto::all();
//Imprimir
return view('proyectos.index',['proyectos' => $proyectos]);
}
//Editar Proyecto
public function edit($id){
$proyectos = bproyecto::all();
$proyecto = bproyecto::findOrFail($id);
return view('proyectos.index',['proyectos' => $proyectos, 'project' => $project]);
}
//Actualizar Proyecto
public function update(Request $request, $id){
$proyecto = bproyecto::findOrFail($id);
//Definiendo Proyecto
$proyecto -> nombre = $request -> nombre;
$proyecto -> descripcion = $request -> descripcion;
$proyecto -> area = $request -> area;
//Guardando Proyecto
$proyecto -> save();
//Retorno
return redirect('/proyectos');
}
//Preguntar
public function preguntar($id){
$proyectos = broyecto::all();
$proyectoDelete = bproyecto::findOrFail($id);
return view('proyectos.index',['proyectos' => $proyectos, 'proyectoDelete' => $proyectoDelete]);
}
public function delete($id){
$proyecto = bproyecto::findOrFail($id);
$proyecto -> delete();
return redirect('/proyectos');
}
}
3 changes: 0 additions & 3 deletions database/migrations/2014_10_12_000000_create_users_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('firtsname');
$table->string('lastname');
$table->string('username')->unique();
$table->string('email')->unique();
$table->string('password');
$table->boolean('status')->default(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function up()
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token');
$table->timestamp('created_at')->nullable();
$table->timestamp('created_at');
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ public function up()
{
Schema::create('blinter_profile', function (Blueprint $table) {
$table->increments('id')->index();
//Datos Personales
$table->mediumText('msg_personal')->nulleable;
$table->mediumText('Bio')->nulleable;
$table->string('Twitter')->nulleable;
$table->string('Facebook')->nulleable;
$table->integer('Celular')->nulleable;
$table->integer('DNI')->nulleable;
//Blinter Skills
$table->integer('Leadership')->{'1'};
$table->integer('Innovation')->{'1'};
Expand All @@ -34,7 +27,7 @@ public function up()
$table->integer('Communication')->{'1'};
$table->integer('Community')->{'1'};
$table->integer('level')->{'1'};
$table->integer('experience')->{'0'};
$table->integer('experience')->{'1'};
//Llave Foreana
$table->integer('user_id')->unsigned();
//Relacion
Expand Down
49 changes: 49 additions & 0 deletions database/migrations/2017_11_18_111303_user_details.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class UserDetails extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_details', function (Blueprint $table) {
$table->increments('id')->index();
//Datos Personales
$table->string('firtsname');
$table->string('lastname');
$table->string('username')->unique();
$table->mediumText('msg_personal')->nulleable;
$table->mediumText('Bio')->nulleable;
$table->string('Twitter')->nulleable;
$table->string('Facebook')->nulleable;
$table->integer('Celular')->nulleable;
$table->integer('DNI')->nulleable;
//Llave Foreana
$table->integer('user_id')->unsigned();
//Relacion
Schema::enableForeignKeyConstraints();
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
//Creacion / Actualizacion
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_details');
}
}
34 changes: 34 additions & 0 deletions database/migrations/2017_11_18_125834_projects.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Projects extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('Projects', function (Blueprint $table) {
$table->increments('id')->index();
$table->string('Nombre');
$table->string('Descripcion');
$table->string('Area');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('Projects');
}
}
36 changes: 0 additions & 36 deletions resources/views/auth/register.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,6 @@
<div class="panel-body">
<form class="form-horizontal" method="POST" action="{{ route('register') }}">
{{ csrf_field() }}
<!--Firts Name-->
<div class="form-group{{ $errors->has('firtsname') ? ' has-error' : '' }}">
<label for="firtsname" class="col-md-4 control-label">Nombres</label>
<div class="col-md-6">
<input id="firtsname" type="text" class="form-control" name="firtsname" value="{{ old('firtsname') }}" required autofocus>
@if ($errors->has('firtsname'))
<span class="help-block">
<strong>{{ $errors->first('firtsname') }}</strong>
</span>
@endif
</div>
</div>
<!--Last Name-->
<div class="form-group{{ $errors->has('lastname') ? ' has-error' : '' }}">
<label for="lastname" class="col-md-4 control-label">Apellidos</label>
<div class="col-md-6">
<input id="lastname" type="text" class="form-control" name="lastname" value="{{ old('lastname') }}" required autofocus>
@if ($errors->has('lastname'))
<span class="help-block">
<strong>{{ $errors->first('lastname') }}</strong>
</span>
@endif
</div>
</div>
<!--Last Name-->
<div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}">
<label for="username" class="col-md-4 control-label">Nickname</label>
<div class="col-md-6">
<input id="username" type="text" class="form-control" name="username" value="{{ old('username') }}" required autofocus>
@if ($errors->has('username'))
<span class="help-block">
<strong>{{ $errors->first('username') }}</strong>
</span>
@endif
</div>
</div>
<!--eMail-->
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
Expand Down
20 changes: 20 additions & 0 deletions resources/views/proyectos/index.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Dashboard</div>
<div class="panel-body">
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
Estas conectado!
</div>
</div>
</div>
</div>
</div>
@endsection
17 changes: 17 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,20 @@
Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

//Sistema de Proyectos
Route::get('/proyectos', function () {
return view('proyectos');
});
//Crear
Route::post('/proyectos/crear', 'ProjectsController@create');
//Leer
Route::get('/proyectos/', 'ProjectsController@read');
//Actualizar
Route::post('/proyectos/update/{id}', 'ProjectsController@update');
//Eliminar
Route::delete('/proyectos/delete/{id}', 'ProjectsController@delete');
//Editar
Route::get('/proyectos/update/{id}', 'ProjectsController@edit');
//Preguntar
Route::get('/proyectos/delete/{id}', 'ProjectsController@preguntar');

0 comments on commit caa5f07

Please sign in to comment.