Commit f5ee17ca by Aan Choesni Herlingga

added model and delete footer migration

parent e68a459f
<?php
namespace App\Models\Webprofile;
use App\Http\Traits\UuidTrait;
use Illuminate\Database\Eloquent\Model;
class Categories extends Model
{
use UuidTrait;
public $incrementing = false;
protected $table = 'swp_categories';
protected $guarded = [];
public function berita()
{
return $this->hasMany(Posts::class, 'id', 'categories');
}
}
<?php
namespace App\Models\Webprofile;
use App\Http\Traits\UuidTrait;
use Illuminate\Database\Eloquent\Model;
class CategoriesFile extends Model
{
use UuidTrait;
public $incrementing = false;
protected $table = 'swp_categories_file';
protected $guarded = [];
public function rFile()
{
return $this->hasMany(File::class, 'categories_file', 'id');
}
}
<?php
namespace App\Models\Webprofile;
use App\Http\Traits\UuidTrait;
use Illuminate\Database\Eloquent\Model;
class Design extends Model
{
use UuidTrait;
public $incrementing = false;
protected $table = 'swp_design';
protected $guarded = [];
}
<?php
namespace App\Models\Webprofile;
use App\Http\Traits\UuidTrait;
use Illuminate\Database\Eloquent\Model;
class File extends Model
{
use UuidTrait;
public $incrementing = false;
protected $table = 'swp_files';
protected $guarded = [];
public function rCategoryFile()
{
return $this->belongsTo(CategoriesFile::class, 'categories_file', 'id');
}
}
<?php
namespace App\Models\Webprofile;
use App\Http\Traits\UuidTrait;
use Illuminate\Database\Eloquent\Model;
class Gallery extends Model
{
use UuidTrait;
public $incrementing = false;
protected $table = 'swp_galeries';
protected $guarded = [];
}
<?php
namespace App\Models\Webprofile;
use App\Http\Traits\UuidTrait;
use Illuminate\Database\Eloquent\Model;
class Information extends Model
{
use UuidTrait;
public $incrementing = false;
protected $table = 'swp_informations';
protected $guarded = [];
}
<?php
namespace App\Models\Webprofile;
use App\Http\Traits\UuidTrait;
use Illuminate\Database\Eloquent\Model;
class Menu extends Model
{
use UuidTrait;
public $incrementing = false;
protected $table = 'swp_menus';
protected $fillable = [];
}
<?php
namespace App\Models\Webprofile;
use App\Http\Traits\UuidTrait;
use Illuminate\Database\Eloquent\Model;
use App\Models\Webprofile\Categories;
class Pages extends Model
{
use UuidTrait;
public $incrementing = false;
protected $table = 'swp_pages';
protected $fillable = [];
}
<?php
namespace App\Models\Webprofile;
use App\Http\Traits\UuidTrait;
use Illuminate\Database\Eloquent\Model;
use App\Models\Webprofile\Categories;
class Posts extends Model
{
use UuidTrait;
public $incrementing = false;
protected $table = 'swp_posts';
protected $guarded = [];
public function kategori()
{
return $this->belongsTo(Categories::class, 'categories', 'id');
}
}
<?php
namespace App\Models\Webprofile;
use App\Http\Traits\UuidTrait;
use Illuminate\Database\Eloquent\Model;
class Setting extends Model
{
use UuidTrait;
public $incrementing = false;
protected $table = 'swp_settings';
protected $guarded = [];
}
<?php
namespace App\Models\Webprofile;
use Illuminate\Database\Eloquent\Model;
class Slider extends Model
{
public $incrementing = false;
protected $table = 'swp_sliders';
protected $guarded = [];
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFooterTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('swp_footer', function (Blueprint $table) {
$table->string('id', 32);
$table->text('row1')->nullable();
$table->text('row2')->nullable();
$table->text('row3')->nullable();
$table->text('row4')->nullable();
$table->string('userid_created', 32)->nullable();
$table->string('userid_updated', 32)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('swp_footer');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment