diff --git a/app/Exceptions/ViewException.php b/app/Exceptions/ViewException.php new file mode 100644 index 0000000..5c21332 --- /dev/null +++ b/app/Exceptions/ViewException.php @@ -0,0 +1,14 @@ +captured = $captured; + parent::__construct($cause); + } +} diff --git a/app/Http/Controllers/TableController.php b/app/Http/Controllers/TableController.php index 576478c..b7c509e 100644 --- a/app/Http/Controllers/TableController.php +++ b/app/Http/Controllers/TableController.php @@ -13,6 +13,18 @@ class TableController extends Controller */ public function create() { - return view('table.create'); + $exampleColSpec = + "string, latin, Latin Name\n". + "string, common, Common Name\n". + "int, lifespan, Lifespan"; + + $exampleData = + "Mercenaria mercenaria, hard clam, 40\n" . + "Magallana gigas, pacific oyster, 30\n" . + "Patella vulgata, common limpet, 20"; + + return view('table.create', + compact('exampleColSpec', 'exampleData') + ); } } diff --git a/resources/views/table/create.blade.php b/resources/views/table/create.blade.php index 905decf..a3a8783 100644 --- a/resources/views/table/create.blade.php +++ b/resources/views/table/create.blade.php @@ -3,9 +3,90 @@ @section('content')
Insert the initial table definition and data in CSV format. Columns are defined as CSV rows:
+