test salvataggio files
This commit is contained in:
parent
76dc244db5
commit
622a1a7778
@ -16,7 +16,7 @@ class GenDoc extends Model
|
||||
|
||||
public static function saveDocument($data){
|
||||
|
||||
$filename=$data->file('filename')->store(self::getEntityFolder($data['entity']));
|
||||
$filename=$data->file('filename')->store(asset(self::getEntityFolder($data['entity'])));
|
||||
DB::table('gen_docs')
|
||||
->insert([
|
||||
'entity'=>$data['entity'],
|
||||
@ -26,14 +26,14 @@ class GenDoc extends Model
|
||||
]);
|
||||
}
|
||||
|
||||
public static function listDocument($entity,$entity_id = 0)
|
||||
public static function listDocument($entity,$entity_id = 1)
|
||||
{
|
||||
// Ritorna la lista dei documenti in base all'entità e al rispettivo id
|
||||
return DB::table('gen_docs')->where('entity','=',$entity)->where('entity_id','=',$entity_id)->get(); //nuova funzione
|
||||
// return DB::table('documentis')->where('movimenti_id','=', $entity_id)->get();
|
||||
}
|
||||
|
||||
public static function countDocument($entity,$entity_id = 0){
|
||||
public static function countDocument($entity,$entity_id = 1){
|
||||
// Conta i documenti inseriti per la determinata entità e id
|
||||
$quanti=DB::table('gen_docs')
|
||||
->where('entity','=',$entity)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user