admin slider order
This commit is contained in:
parent
755cc2e50a
commit
0e9dc5e984
|
|
@ -37,7 +37,7 @@ class SliderCrudController extends CrudController
|
|||
// ['name' => 'title','type' => 'text', 'label' => 'Title En'],
|
||||
['name' => 'title_ru','type' => 'text', 'label' => 'Title Ru'],
|
||||
['name' => 'title_tk','type' => 'text', 'label' => 'Title Tk'],
|
||||
// ['name' => 'text','type' => 'text', 'label' => 'Text En'],
|
||||
['name' => 'order','type' => 'number', 'label' => 'Order'],
|
||||
['name' => 'text_ru','type' => 'text', 'label' => 'Text Ru'],
|
||||
['name' => 'text_tk','type' => 'text', 'label' => 'Text Tk'],
|
||||
['name' => 'link','type' => 'text', 'label' => 'Link'],
|
||||
|
|
@ -49,6 +49,7 @@ class SliderCrudController extends CrudController
|
|||
$this->crud->addFields([
|
||||
['name' => 'title_ru','type' => 'text', 'label' => 'Title Ru'],
|
||||
['name' => 'title_tk','type' => 'text', 'label' => 'Title Tk'],
|
||||
['name' => 'order','type' => 'number', 'label' => 'Order'],
|
||||
['name' => 'text_ru','type' => 'summernote', 'label' => 'Text Ru'],
|
||||
['name' => 'text_tk','type' => 'summernote', 'label' => 'Text Tk'],
|
||||
['name' => 'link','type' => 'text', 'label' => 'Link'],
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class Slider extends Model
|
|||
// protected $primaryKey = 'id';
|
||||
// public $timestamps = false;
|
||||
// protected $guarded = ['id'];
|
||||
protected $fillable = ['text_tk','text_ru','image','active','link','title_ru','title_tk'];
|
||||
protected $fillable = ['text_tk','text_ru','image','active','link','title_ru','title_tk','order'];
|
||||
// protected $hidden = [];
|
||||
// protected $dates = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AlterAddOrderToSlidersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('sliders', function (Blueprint $table) {
|
||||
$table->integer('order')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('sliders', function (Blueprint $table) {
|
||||
$table->dropColumn('order');
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue