diff --git a/database/migrations/2018_08_30_102121_sponsoren_links.php b/database/migrations/2018_08_30_102121_sponsoren_links.php new file mode 100644 index 0000000000000000000000000000000000000000..92d5802c408a09de131b7ec39383bbaa8578c88a --- /dev/null +++ b/database/migrations/2018_08_30_102121_sponsoren_links.php @@ -0,0 +1,36 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +class SponsorenLinks extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('sponsorenlinks', function (Blueprint $table) { + $table->increments('id')->unique(); + $table->string('linktext'); + $table->string('link'); + $table->string('langcode'); + $table->timestamp('updated_at'); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('sponsorenlinks'); + + } +} diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index 10b058af8996d863b1a57391116ab5e62de091da..dc0073baba0892d54e84465170e83809d1d9e824 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -25,15 +25,11 @@ <div id="sponsors"> <h2>{{ trans('index.sponsors.head.2') }}</h2> <ul class="startpage"> + @foreach(DB::table('sponsorenlinks')->where('langcode', 'de')->orderByRaw('LENGTH(linktext)', 'ASC')->get() as $link) <li class="sponsor"> - <a href="https://www.semtrix.de/seo-agentur/" target="_blank" rel="noopener"><p>@lang('index.sponsors.woxikon')</p> <i class="fa fa-external-link"></i></a> - </li> - <li class="sponsor"> - <a href="https://b-ceed.de/weihnachtsfeiern-ideen/" target="_blank" rel="noopener"><p>@lang('index.sponsors.seo')</p> <i class="fa fa-external-link"></i></a> - </li> - <li class="sponsor"> - <a href="https://www.stern.de/vergleich/kredit/" target="_blank" rel="noopener"><p>@lang('index.sponsors.gutscheine')</p> <i class="fa fa-external-link"></i></a> + <a href="{{ $link->link }}" target="_blank" rel="noopener"><p>{{ $link->linktext }}</p> <i class="fa fa-external-link"></i></a> </li> + @endforeach </ul> </div> </div>