server_shokki_adv_api
This commit is contained in:
parent
26132854d6
commit
2166ef2443
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 %}
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
|
|
@ -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 %}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue