Skip to content

Commit

Permalink
250220-v3: foto y algunos errores
Browse files Browse the repository at this point in the history
  • Loading branch information
gibmyx committed Feb 25, 2020
1 parent 998979c commit 8aa2973
Show file tree
Hide file tree
Showing 19 changed files with 1,906 additions and 551 deletions.
2 changes: 2 additions & 0 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ protected function create(array $data)
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
'last' => $data['last'],
'sex' => $data['sex']
]);
}
}
7 changes: 5 additions & 2 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ public function ajax_get_detalle()
$response = [
'code' => 201,
'data' => ['usuario' => $user->name,
"apellido" => $user->last,
'email' => $user->email,
'user_id' => $user->id]
];
'user_id' => $user->id,
"profile" => $user->profile,
"sex" => $user->sex]
];
return response()->json($response, 200);
}
}
2 changes: 1 addition & 1 deletion app/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class User extends Authenticatable
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
'name', 'email', 'password', 'sex', 'last'
];

/**
Expand Down
36 changes: 36 additions & 0 deletions database/migrations/2020_02_25_161906_add_apellido_users_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

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

class AddApellidoUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->string('sex')->after('name')->default('hombre');
$table->string('last')->after('name')->nullable('true');
$table->string('profile')->after('name')->default('defaultProfile.jpg');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('last');
$table->dropColumn('profile');
$table->dropColumn('sex');
});
}
}
Binary file added public/img/profile/perfil-hombre-default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/profile/perfil-mujer-default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8aa2973

Please sign in to comment.