server_shokki_adv_api

This commit is contained in:
root 2022-03-14 06:01:40 +00:00
parent 26132854d6
commit 2166ef2443
11 changed files with 116 additions and 4 deletions

View File

@ -26,6 +26,7 @@ class AdvertisementsController extends Controller
//categories list //categories list
$data = $this->Reklama->select('id','title', 'url', DB::raw("IF(media_mobile<>'',concat('$path',media_mobile),media_mobile) as media_mobile")) $data = $this->Reklama->select('id','title', 'url', DB::raw("IF(media_mobile<>'',concat('$path',media_mobile),media_mobile) as media_mobile"))
->where('active',1) ->where('active',1)
->orderBy('order_app', 'ASC')
->paginate(5) ->paginate(5)
->toArray(); ->toArray();

View File

@ -21,7 +21,7 @@
> >
<picture> <picture>
<source media="(min-width:700px)" srcset="{{reklama.media|media_cdn}}"> <source media="(min-width:700px)" srcset="{{reklama.media|media_cdn}}">
<img src="{{reklama.media_mobile|default(reklama.media)|media_cdn}}" alt="{{reklama.title}}"> <img src="{{reklama.web_media_mobile|default(reklama.media)|media_cdn}}" alt="{{reklama.title}}">
</picture> </picture>
</a> </a>
{% endfor %} {% endfor %}

View File

@ -1,4 +1,3 @@
{% set reklama = __SELF__.group.adds.first %} {% set reklama = __SELF__.group.adds.first %}
<a <a
{% if reklama.url %} {% if reklama.url %}
@ -14,6 +13,6 @@
> >
<picture> <picture>
<source media="(min-width:700px)" srcset="{{reklama.media|media_cdn}}"> <source media="(min-width:700px)" srcset="{{reklama.media|media_cdn}}">
<img src="{{reklama.media_mobile|default(reklama.media)|media_cdn}}" alt="{{reklama.title}}"> <img src="{{reklama.web_media_mobile|default(reklama.media)|media_cdn}}" alt="{{reklama.title}}">
</picture> </picture>
</a> </a>

View File

@ -12,7 +12,7 @@
> >
<picture> <picture>
<source media="(min-width:700px)" srcset="{{reklama.media|media_cdn}}"> <source media="(min-width:700px)" srcset="{{reklama.media|media_cdn}}">
<img src="{{reklama.media_mobile|default(reklama.media)|media_cdn}}" alt="{{reklama.title}}" > <img src="{{reklama.web_media_mobile|default(reklama.media)|media_cdn}}" alt="{{reklama.title}}" >
</picture> </picture>
</a> </a>
{% endfor %} {% endfor %}

View File

@ -39,3 +39,7 @@ columns:
type: text type: text
searchable: true searchable: true
sortable: true sortable: true
order_app:
label: 'App Order'
type: number
sortable: true

View File

@ -19,6 +19,10 @@ fields:
span: auto span: auto
required: 1 required: 1
type: relation type: relation
order_app:
label: 'Order Application'
span: auto
type: number
order: order:
label: 'Sort order' label: 'Sort order'
span: auto span: auto

View File

@ -0,0 +1,23 @@
<?php namespace Tps\Reklama\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateTpsReklamaItem10 extends Migration
{
public function up()
{
Schema::table('tps_reklama_item', function($table)
{
$table->integer('order_num')->default(0);
});
}
public function down()
{
Schema::table('tps_reklama_item', function($table)
{
$table->dropColumn('order_num');
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Tps\Reklama\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateTpsReklamaItem11 extends Migration
{
public function up()
{
Schema::table('tps_reklama_item', function($table)
{
$table->integer('order_num')->default(9999)->change();
});
}
public function down()
{
Schema::table('tps_reklama_item', function($table)
{
$table->integer('order_num')->default(0)->change();
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Tps\Reklama\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateTpsReklamaItem12 extends Migration
{
public function up()
{
Schema::table('tps_reklama_item', function($table)
{
$table->dropColumn('order_num');
});
}
public function down()
{
Schema::table('tps_reklama_item', function($table)
{
$table->integer('order_num')->default(9999);
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Tps\Reklama\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateTpsReklamaItem13 extends Migration
{
public function up()
{
Schema::table('tps_reklama_item', function($table)
{
$table->integer('order_app')->default(999);
});
}
public function down()
{
Schema::table('tps_reklama_item', function($table)
{
$table->dropColumn('order_app');
});
}
}

View File

@ -42,3 +42,15 @@
1.0.15: 1.0.15:
- 'Updated table tps_reklama_item' - 'Updated table tps_reklama_item'
- builder_table_update_tps_reklama_item_9.php - builder_table_update_tps_reklama_item_9.php
1.0.16:
- 'Updated table tps_reklama_item'
- builder_table_update_tps_reklama_item_10.php
1.0.17:
- 'Updated table tps_reklama_item'
- builder_table_update_tps_reklama_item_11.php
1.0.18:
- 'Updated table tps_reklama_item'
- builder_table_update_tps_reklama_item_12.php
1.0.19:
- 'Updated table tps_reklama_item'
- builder_table_update_tps_reklama_item_13.php