Gallery und GalleryItem Model
This commit is contained in:
parent
293c2c535f
commit
c180d2be9d
12 changed files with 315 additions and 1 deletions
10
motorradig/app/Gallery.php
Normal file
10
motorradig/app/Gallery.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Gallery extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
10
motorradig/app/GalleryItem.php
Normal file
10
motorradig/app/GalleryItem.php
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class GalleryItem extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
85
motorradig/app/Http/Controllers/GalleryController.php
Normal file
85
motorradig/app/Http/Controllers/GalleryController.php
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Gallery;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class GalleryController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param \App\Gallery $gallery
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(Gallery $gallery)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param \App\Gallery $gallery
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(Gallery $gallery)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \App\Gallery $gallery
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, Gallery $gallery)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param \App\Gallery $gallery
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Gallery $gallery)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
85
motorradig/app/Http/Controllers/GalleryItemController.php
Normal file
85
motorradig/app/Http/Controllers/GalleryItemController.php
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\GalleryItem;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class GalleryItemController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param \App\GalleryItem $galleryItem
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(GalleryItem $galleryItem)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param \App\GalleryItem $galleryItem
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(GalleryItem $galleryItem)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \App\GalleryItem $galleryItem
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, GalleryItem $galleryItem)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param \App\GalleryItem $galleryItem
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(GalleryItem $galleryItem)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
12
motorradig/database/factories/GalleryFactory.php
Normal file
12
motorradig/database/factories/GalleryFactory.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
use App\Gallery;
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
$factory->define(Gallery::class, function (Faker $faker) {
|
||||
return [
|
||||
//
|
||||
];
|
||||
});
|
||||
12
motorradig/database/factories/GalleryItemFactory.php
Normal file
12
motorradig/database/factories/GalleryItemFactory.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
/** @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
use App\GalleryItem;
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
$factory->define(GalleryItem::class, function (Faker $faker) {
|
||||
return [
|
||||
//
|
||||
];
|
||||
});
|
||||
|
|
@ -24,6 +24,8 @@ class CreateToursTable extends Migration
|
|||
$table->boolean('is_cancelled')->default(false);
|
||||
$table->text('bericht')->nullable();
|
||||
$table->string('status')->default('FINDET STATT');
|
||||
$table->integer('presentation_gallery_id')->default(-1);
|
||||
$table->integer('tour_gallery_id')->default(-1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateGalleriesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('galleries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('galleries');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateGalleryItemsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('gallery_items', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('gallery_id');
|
||||
$table->integer('order')->default(0);
|
||||
$table->string('filename');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('gallery_items');
|
||||
}
|
||||
}
|
||||
16
motorradig/database/seeds/GalleryItemSeeder.php
Normal file
16
motorradig/database/seeds/GalleryItemSeeder.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class GalleryItemSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
16
motorradig/database/seeds/GallerySeeder.php
Normal file
16
motorradig/database/seeds/GallerySeeder.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class GallerySeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
<input type="file" class="mt-3 mr-2 form-control" id="bild" style="font-size:20px;" name="bild" value="" >
|
||||
</div>
|
||||
|
||||
|
||||
@if($tour->)
|
||||
<div class="form-group" style="display:flex;">
|
||||
<label class="ml-2 mt-3" style="width:140px; text-align:left;font-size:18px;" for="name">Storniert:</label>
|
||||
<input class="mt-3 mr-2 form-control" type="checkbox" id="anmeldeschluss" style="font-size:10px;width:20px;" name="anmeldeschluss" value="{{ old('anmeldeschluss') ?? $tour->deadline }}" >
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue