Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
onestartup-product-primer_plano
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Francisco Salazar
onestartup-product-primer_plano
Commits
f7be49f7
Commit
f7be49f7
authored
Sep 11, 2018
by
Francisco Salazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Campos de ubicacion
parent
5cdf52d8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
132 additions
and
1 deletions
+132
-1
2018_09_03_211112_add_extras_to_products_table.php
...ations/2018_09_03_211112_add_extras_to_products_table.php
+1
-0
2018_09_11_172325_add_localidad_to_products_table.php
...ons/2018_09_11_172325_add_localidad_to_products_table.php
+44
-0
Product.php
src/models/Product.php
+12
-1
fields.blade.php
src/views/product/fields.blade.php
+75
-0
No files found.
src/migrations/2018_09_03_211112_add_extras_to_products_table.php
View file @
f7be49f7
...
...
@@ -52,6 +52,7 @@ class AddExtrasToProductsTable extends Migration
public
function
down
()
{
Schema
::
table
(
'products'
,
function
(
Blueprint
$table
)
{
//$table->dropForeign(['asesor_id']);
$table
->
dropColumn
([
'precio_renta'
,
'tipo_moneda_renta'
,
'precio_renta_tiene_oferta'
,
'precio_renta_oferta'
,
...
...
src/migrations/2018_09_11_172325_add_localidad_to_products_table.php
0 → 100644
View file @
f7be49f7
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
AddLocalidadToProductsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'products'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'pais'
)
->
nullable
();
$table
->
string
(
'estado'
)
->
nullable
();
$table
->
string
(
'municipio'
)
->
nullable
();
$table
->
string
(
'colonia'
)
->
nullable
();
$table
->
string
(
'codigo_postal'
)
->
nullable
();
$table
->
string
(
'calle'
)
->
nullable
();
$table
->
string
(
'direccion'
)
->
nullable
();
$table
->
string
(
'latitud'
)
->
nullable
();
$table
->
string
(
'longitud'
)
->
nullable
();
$table
->
string
(
'zoom'
)
->
nullable
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'products'
,
function
(
Blueprint
$table
)
{
$table
->
dropColumn
([
'pais'
,
'estado'
,
'municipio'
,
'colonia'
,
'codigo_postal'
,
'calle'
,
'direccion'
,
'latitud'
,
'longitud'
,
'zoom'
]);
});
}
}
src/models/Product.php
View file @
f7be49f7
...
...
@@ -46,7 +46,18 @@ class Product extends Model
'medios_banos'
,
'dormitorios'
,
'edad'
,
'asesor_id'
'asesor_id'
,
'pais'
,
'estado'
,
'municipio'
,
'colonia'
,
'codigo_postal'
,
'calle'
,
'direccion'
,
'latitud'
,
'longitud'
,
'zoom'
];
...
...
src/views/product/fields.blade.php
View file @
f7be49f7
...
...
@@ -172,6 +172,9 @@
</div>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h3>
Precios
</h3>
</div>
<div
class=
"col-md-6"
>
<div
class=
"form-group"
>
{!! Form::label('precio_renta', "Precio de renta", ['class'=>'control-label'])!!}
...
...
@@ -226,6 +229,9 @@
</div>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h3>
Dimensiones
</h3>
</div>
<div
class=
"col-md-3"
>
<div
class=
"form-group"
>
{!! Form::label('metros_construccion', "Metros de construccion", ['class'=>'control-label'])!!}
...
...
@@ -253,6 +259,75 @@
</div>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h3>
Ubicación
</h3>
</div>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
{!! Form::label('pais', "País", ['class'=>'control-label'])!!}
{!! Form::text('pais', null, ["class"=>"form-control"]) !!}
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
{!! Form::label('estado', "Estado", ['class'=>'control-label'])!!}
{!! Form::text('estado', null, ["class"=>"form-control"]) !!}
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
{!! Form::label('municipio', "Municipio", ['class'=>'control-label'])!!}
{!! Form::text('municipio', null, ["class"=>"form-control"]) !!}
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
{!! Form::label('colonia', "Colonia", ['class'=>'control-label'])!!}
{!! Form::text('colonia', null, ["class"=>"form-control"]) !!}
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
{!! Form::label('calle', "calle", ['class'=>'control-label'])!!}
{!! Form::text('calle', null, ["class"=>"form-control"]) !!}
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
{!! Form::label('direccion', "direccion", ['class'=>'control-label'])!!}
{!! Form::text('direccion', null, ["class"=>"form-control"]) !!}
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
{!! Form::label('latitud', "longitud", ['class'=>'control-label'])!!}
{!! Form::text('latitud', null, ["class"=>"form-control"]) !!}
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
{!! Form::label('longitud', "longitud", ['class'=>'control-label'])!!}
{!! Form::text('longitud', null, ["class"=>"form-control"]) !!}
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
{!! Form::label('zoom', "zoom", ['class'=>'control-label'])!!}
{!! Form::text('zoom', null, ["class"=>"form-control"]) !!}
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
{!! Form::label('codigo_postal', "codigo_postal", ['class'=>'control-label'])!!}
{!! Form::text('codigo_postal', null, ["class"=>"form-control"]) !!}
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h3>
Extras
</h3>
</div>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
{!! Form::label('banos', "Baños", ['class'=>'control-label'])!!}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment