Commit iniziale
This commit is contained in:
24
app/Models/Accessori.php
Normal file
24
app/Models/Accessori.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class Accessori extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public static function saveAccessori($id,$data)
|
||||
{
|
||||
DB::table('accessoris')->insert([
|
||||
'fk_operazione_id'=>$id,
|
||||
'descrizione'=>$data['descrizione'],
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getElementsbyOperazione($data) {
|
||||
return DB::table('accessoris')->where('fk_operazione_id','=',$data)->get();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user