This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function uploadLogo() { | |
$file = Input::file('logo'); | |
$destinationPath = Lingkungan::$logoPath; | |
$filename = $file->getClientOriginalName(); | |
$img = Image::make($file->getRealPath())->resize(150, 150)->save(public_path().$destinationPath.$filename); | |
if($img) { | |
return Response::json(['type' => 'success', 'full_filename' => asset($destinationPath.$filename), 'filename' => $filename]); | |
}else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
*Kelas memecah format tanggal YYYY-MM-DD | |
*digunakan untuk menghitung JDN sebuah tanggal untuk dapat menghitung selisih antar 2 tanggal | |
*@author : Jimboy | |
*/ | |
class PecahTanggal{ | |
private $pecah; | |
private $hari; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class UserPegawai extends User { | |
public function get_toko_bunga() | |
{ | |
$q = "SELECT | |
a.id_tokobunga, | |
b.nama, | |
b.alamat, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class RoomController extends BaseController { | |
public function index() | |
{ | |
$rooms = Room::all(); | |
return View::make('admin.room.index', compact('rooms')); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function contentData(){ // datatables processing | |
/* Array of database columns which should be read and sent back to DataTables. Use a space where | |
* you want to insert a non-database field (for example a counter or static image) | |
*/ | |
$aColumns = array("'no'","data_tabel.id_konten","data_tabel.nama_kat","data_tabel.nama_konten","data_tabel.status_posting","'option'" ); | |
/* Indexed column (used for fast and accurate table cardinality) */ | |
$sIndexColumn = "data_tabel.id_konten"; | |
/* DB table to use */ | |
$aTable = array( "(SELECT a.id_konten, a.nama_konten, b.nama_kat, a.status_posting FROM tb_konten a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", | |
"CVS", | |
"tmp", | |
".bundle", | |
".sass-cache" |
NewerOlder