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