Skip to content

d #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

d #2

Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions app/Http/Controllers/AromaController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class AromaController extends Controller
{
//
}
10 changes: 10 additions & 0 deletions app/Http/Controllers/CajaController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class CajaController extends Controller
{
//
}
25 changes: 25 additions & 0 deletions app/Http/Controllers/ClienteController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace App\Http\Controllers;

use App\Models\Cliente;
use Illuminate\Http\Request;

class ClienteController extends Controller
{
public function store(Request $request){
Cliente::create($request->all());
}


public function update()
{

}


public function destroy()
{

}
}
10 changes: 10 additions & 0 deletions app/Http/Controllers/CompraController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class CompraController extends Controller
{
//
}
10 changes: 10 additions & 0 deletions app/Http/Controllers/CompraDetalleController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class CompraDetalleController extends Controller
{
//
}
10 changes: 10 additions & 0 deletions app/Http/Controllers/CondicionVentaController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class CondicionVentaController extends Controller
{
//
}
10 changes: 10 additions & 0 deletions app/Http/Controllers/MarcaController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class MarcaController extends Controller
{
//
}
10 changes: 10 additions & 0 deletions app/Http/Controllers/MetodoPagoController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class MetodoPagoController extends Controller
{
//
}
10 changes: 10 additions & 0 deletions app/Http/Controllers/ProductoController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class ProductoController extends Controller
{
//
}
10 changes: 10 additions & 0 deletions app/Http/Controllers/ProveedorController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class ProveedorController extends Controller
{
//
}
10 changes: 10 additions & 0 deletions app/Http/Controllers/TiendaController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class TiendaController extends Controller
{
//
}
10 changes: 10 additions & 0 deletions app/Http/Controllers/VentaController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class VentaController extends Controller
{
//
}
10 changes: 10 additions & 0 deletions app/Http/Controllers/VentaDetalleController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class VentaDetalleController extends Controller
{
//
}
10 changes: 10 additions & 0 deletions app/Http/Controllers/VentaPagoController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class VentaPagoController extends Controller
{
//
}
21 changes: 21 additions & 0 deletions app/Models/Aroma.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class Aroma extends Model
{
use HasFactory;

public function aromaCompra(): HasMany
{
return $this->hasMany(CompraDetalle::class);
}
public function aromaVenta(): HasMany
{
return $this->hasMany(VentaDetalle::class);
}
}
31 changes: 31 additions & 0 deletions app/Models/Caja.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

class Caja extends Model
{
use HasFactory;
protected $fillable =[
'usuario_id',
'monto_inicial',
'monto_final'
];

public function cajaHaber(): HasMany
{
return $this->hasMany(Compra::class);
}
public function cajaDebe(): HasMany
{
return $this->hasMany(Venta::class);
}

public function usuarioCaja(): BelongsTo{
return $this->belongsTo(User::class);
}
}
23 changes: 23 additions & 0 deletions app/Models/Cliente.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class Cliente extends Model
{
use HasFactory;
protected $fillable = [
'dni',
'nombre',
'apellido',
'direccion_calle',
'direccion_numero',
];
public function venta(): HasMany
{
return $this->hasMany(VentaDetalle::class);
}
}
27 changes: 27 additions & 0 deletions app/Models/Compra.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

class Compra extends Model
{
use HasFactory;
public function detalleCompra(): HasMany
{
return $this->hasMany(CompraDetalle::class);
}

public function usuario(): HasMany //
{
return $this->hasMany(CompraDetalle::class);
}

public function caja(): BelongsTo
{
return $this->belongsTo(Caja::class);
}
}
35 changes: 35 additions & 0 deletions app/Models/CompraDetalle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class CompraDetalle extends Model
{
use HasFactory;
public function compra(): BelongsTo //
{
return $this->belongsTo(Compra::class);
}

public function caja(): BelongsTo
{
return $this->belongsTo(Caja::class);
}
public function productoCompraDetalle(): BelongsTo //
{
return $this->belongsTo(Producto::class);
}

public function proveedorCompraDetalle(): BelongsTo //
{
return $this->belongsTo(Proveedor::class);
}

public function aromaCompraDetalle(): BelongsTo //
{
return $this->belongsTo(Aroma::class);
}
}
15 changes: 15 additions & 0 deletions app/Models/CondicionVenta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class CondicionVenta extends Model
{
use HasFactory;
public function condicionProducto():HasMany{
return $this->hasMany(Producto::class);
}
}
16 changes: 16 additions & 0 deletions app/Models/Marca.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class Marca extends Model
{
use HasFactory;
public function marcaProducto(): HasMany
{
return $this->hasMany(Producto::class);
}
}
16 changes: 16 additions & 0 deletions app/Models/MetodoPago.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class MetodoPago extends Model
{
use HasFactory;
public function metodoPagoEnVenta(): HasMany
{
return $this->hasMany(VentaPago::class);
}
}
29 changes: 29 additions & 0 deletions app/Models/Producto.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

class Producto extends Model
{
use HasFactory;
public function productoCompra(): HasMany
{
return $this->hasMany(CompraDetalle::class);
}
public function productoVenta(): HasMany
{
return $this->hasMany(VentaDetalle::class);
}
public function condicion(): BelongsTo
{
return $this->belongsTo(CondicionVenta::class);
}
public function marca(): BelongsTo
{
return $this->belongsTo(Marca::class);
}
}
Loading