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) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->foreignId('movimenti_id');
|
||||
$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,18 +6,16 @@
|
||||
|
||||
@section('content')
|
||||
<div class="row p-2">
|
||||
|
||||
<a href="document/new/folder" class="button"> + Nuova Cartella</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Lista cartelle
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<div class="panel-body">
|
||||
<table class="table table-striped table-bordered table-hover" id="tab_documenti">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -39,7 +37,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@section('script')
|
||||
<script src="/js/app/documenti.js"></script>
|
||||
<script src="/js/app/documenti.js"></script>
|
||||
@endsection
|
Loading…
Reference in New Issue
Block a user