diff --git a/motorradig/app/Http/Controllers/AdminController.php b/motorradig/app/Http/Controllers/AdminController.php new file mode 100644 index 0000000..f7bfc70 --- /dev/null +++ b/motorradig/app/Http/Controllers/AdminController.php @@ -0,0 +1,53 @@ +validate( + [ + 'tourplan'=>'required|mimes:pdf|max:2048' + ] + ); + + $request->file('tourplan')->storeAs('pdf', 'tourenplan.pdf','public2'); + + return view ('/home'); + } + + + + public function upload_mitgliedsantrag(Request $request) + { + return view ('admin.upload_mitgliedsantrag'); + } + + public function store_mitgliedsantrag(Request $request) + { + $request->validate( + [ + 'mitgliedsantrag' => 'required|mimes:pdf|max:2048' + ] + ); + + $request->file('mitgliedsantrag')->storeAs('pdf', 'mitgliedsantrag.pdf', 'public2'); + + return view('/home'); + } + + public function edit_start_page(Request $request) { + return view('admin.edit_start'); + } + public function edit_activity_page(Request $request) { + return view('admin.edit_activities'); + } +} diff --git a/motorradig/app/Http/Controllers/TourController.php b/motorradig/app/Http/Controllers/TourController.php new file mode 100644 index 0000000..d9b13d9 --- /dev/null +++ b/motorradig/app/Http/Controllers/TourController.php @@ -0,0 +1,90 @@ + env('APP_URL').'/storage', 'visibility' => 'public', ], - + 'public2' => [ + 'driver' => 'local', + 'root' => '.' + ], 's3' => [ 'driver' => 's3', 'key' => env('AWS_ACCESS_KEY_ID'), @@ -78,8 +81,8 @@ return [ | */ - 'links' => [ - public_path('storage') => storage_path('app/public'), - ], + // 'links' => [ + // public_path('storage') => storage_path('app/public'), + // ], ]; diff --git a/motorradig/database/factories/TourFactory.php b/motorradig/database/factories/TourFactory.php new file mode 100644 index 0000000..6b87877 --- /dev/null +++ b/motorradig/database/factories/TourFactory.php @@ -0,0 +1,12 @@ +define(Tour::class, function (Faker $faker) { + return [ + // + ]; +}); diff --git a/motorradig/database/migrations/2020_09_30_082629_create_tours_table.php b/motorradig/database/migrations/2020_09_30_082629_create_tours_table.php new file mode 100644 index 0000000..d36d8bf --- /dev/null +++ b/motorradig/database/migrations/2020_09_30_082629_create_tours_table.php @@ -0,0 +1,31 @@ +id(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('tours'); + } +} diff --git a/motorradig/database/migrations/2020_09_30_100556_create_pages_table.php b/motorradig/database/migrations/2020_09_30_100556_create_pages_table.php new file mode 100644 index 0000000..f9d4560 --- /dev/null +++ b/motorradig/database/migrations/2020_09_30_100556_create_pages_table.php @@ -0,0 +1,33 @@ +id(); + $table->string('name'); + $table->text('content'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('pages'); + } +} diff --git a/motorradig/database/seeds/TourSeeder.php b/motorradig/database/seeds/TourSeeder.php new file mode 100644 index 0000000..b364a32 --- /dev/null +++ b/motorradig/database/seeds/TourSeeder.php @@ -0,0 +1,16 @@ + +