File tree 3 files changed +24
-2
lines changed 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public static function routes()
21
21
}
22
22
23
23
if ($ format == 'csv ' ) {
24
- $ filename = date ('Ymd ' ).self ::filename ($ format );
24
+ $ filename = date ('Ymd ' ).' - ' . self ::filename ($ format );
25
25
26
26
return response ($ content , 200 , [
27
27
'Content-Type ' => 'text/csv ' ,
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function getContents()
30
30
$ output [] = PHP_EOL ;
31
31
}
32
32
33
- $ schema = implode ('' , $ output );
33
+ $ schema = implode (PHP_EOL , $ output );
34
34
$ stub = $ this ->getStub ();
35
35
$ database_config = config ('database.connections. ' .$ this ->connection );
36
36
$ host = isset ($ database_config ['host ' ]) ? $ database_config ['host ' ] : null ;
@@ -46,4 +46,13 @@ public function getContents()
46
46
$ schema ,
47
47
], $ stub );
48
48
}
49
+
50
+ public function getStub ()
51
+ {
52
+ $ path = file_exists (
53
+ base_path ('stubs/db-doc-csv.stub ' )
54
+ ) ? base_path ('stubs/db-doc-csv.stub ' ) : __DIR__ .'/../../stubs/db-doc-csv.stub ' ;
55
+
56
+ return file_get_contents ($ path );
57
+ }
49
58
}
Original file line number Diff line number Diff line change
1
+ APP_NAME Database Schema
2
+
3
+ Database Details
4
+
5
+ Type,Value
6
+ Connection,DB_CONNECTION
7
+ Host,DB_HOST
8
+ Port,DB_PORT
9
+ Database,DB_DATABASE
10
+
11
+ DB_DATABASE Schema
12
+
13
+ SCHEMA_CONTENT
You can’t perform that action at this time.
0 commit comments