creato seeder iniziale per Documenti e modificato migration File di Documentis
This commit is contained in:
parent
d25fe1cef1
commit
0ba070ba54
@ -16,22 +16,12 @@ class CreateDocumentisTable extends Migration
|
|||||||
Schema::create('documentis', function (Blueprint $table) {
|
Schema::create('documentis', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->foreignId('movimenti_id');
|
|
||||||
$table->string('descrizione');
|
$table->string('descrizione');
|
||||||
$table->string('filename');
|
// $table->foreignId('movimenti_id');
|
||||||
|
// Aggiunto per definire il nome della cartella
|
||||||
|
$table->string('path');
|
||||||
|
// $table->string('filename');
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
{issue #5} GITEA - proposta modifica
|
|
||||||
Schema::create('documentis', function (Blueprint $table) {
|
|
||||||
$table->id();
|
|
||||||
$table->timestamps();
|
|
||||||
$table->string('entita');
|
|
||||||
$table->bigInteger('entita_id');
|
|
||||||
$table->string('descrizione');
|
|
||||||
$table->string('filename');
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
44
database/seeders/Documenti.php
Normal file
44
database/seeders/Documenti.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use App\Models\Documenti as Doc;
|
||||||
|
|
||||||
|
class Documenti extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
Doc::create([
|
||||||
|
'id'=>0,
|
||||||
|
'descrizione' => 'Movimenti',
|
||||||
|
'path' => 'Movimenti',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 1,
|
||||||
|
'descrizione' => 'Contratti',
|
||||||
|
'path' => 'Contratti',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 2,
|
||||||
|
'descrizione' => 'Automobili',
|
||||||
|
'path' => 'Automobili',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 3,
|
||||||
|
'descrizione' => 'Progetti',
|
||||||
|
'path' => 'Progetti',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 4,
|
||||||
|
'descrizione' => 'Documenti',
|
||||||
|
'path' => 'Documenti',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
@ -6,10 +6,9 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="row p-2">
|
<div class="row p-2">
|
||||||
|
|
||||||
<a href="document/new/folder" class="button"> + Nuova Cartella</a>
|
<a href="document/new/folder" class="button"> + Nuova Cartella</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
@ -17,7 +16,6 @@
|
|||||||
Lista cartelle
|
Lista cartelle
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
|
||||||
<table class="table table-striped table-bordered table-hover" id="tab_documenti">
|
<table class="table table-striped table-bordered table-hover" id="tab_documenti">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -39,7 +37,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
@section('script')
|
@section('script')
|
||||||
<script src="/js/app/documenti.js"></script>
|
<script src="/js/app/documenti.js"></script>
|
||||||
@endsection
|
@endsection
|
Loading…
Reference in New Issue
Block a user