Skip to content

Instantly share code, notes, and snippets.

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Produk extends Model
{
protected $fillable = [
'name', 'detail'
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTabelProduk extends Migration
{
/**
* Run the migrations.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Blog Home - Solusi Programming</title>
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->model('blogpost_model');
$this->load->model('categories_model');
}
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jan 15, 2020 at 01:34 PM
-- Server version: 5.7.23
-- PHP Version: 7.1.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Categories_model extends MY_Model {
protected $table = 'categories';
protected $key = 'id';
protected $soft_deletes = false;
protected $date_format = 'datetime';
protected $set_created = false;
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Blogpost_model extends MY_Model {
protected $table = 'blogpost';
protected $key = 'id';
protected $soft_deletes = false;
protected $date_format = 'datetime';
protected $set_created = false;
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
Copyright (c) 2011 Lonnie Ezell
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->model('blogpost_model');
$this->load->model('categories_model');
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Blog Home - Solusi Programming</title>