Skip to content

Instantly share code, notes, and snippets.

View subdesign's full-sized avatar
🎯
Focusing

Barna Szalai subdesign

🎯
Focusing
View GitHub Profile
@subdesign
subdesign / gist:a5308739b8134350680cb5a51af9cd35
Last active January 12, 2022 08:34
Make latest HeidiSQL available on MacOS
1. Download and install Winebottler. https://winebottler.kronenberg.org/
select Development version
it will install Wine, too.
!! Winebottler only works on Mojave or High Sierra !!
2. Install the downloaded dmg
3. Move Wine and Winebottler to the /Applications folder
<?php
public function articlesajax()
{
$result = DB::table('articles')
->join('users', 'articles.user_id', '=', 'users.id')
->select('articles.id as id', 'articles.title as title', 'users.fullname', 'articles.created_at', 'articles.updated_at');
return Datatables::of($result)
->add_column('edit', '<a href="/admin/article_edit/{{ $id }}"><i class="icon-list-alt"></i>Edit</a>')
$('#articles').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "admin/articlesajax",
"aaSorting": [[ 3, "desc" ]],
"aoColumns": [
{ 'sWidth': '60px' },
{ 'sWidth': '130px', 'sClass': 'center' },
{ 'sWidth': '180px', 'sClass': 'center' },
{ 'sWidth': '60px', 'sClass': 'center' },
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-condensed table-bordered" id="articles">
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>Author</th>
<th>Created At</th>
<th>Updated At</th>
<th colspan=”2”>Operations</th>
</tr>
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-condensed table-bordered" id="articles">
<thead>
<tr>
<th>ID</th>
<th>Title</th>
<th>Author</th>
<th>Created At</th>
<th>Updated At</th>
<th colspan=”2”>Operations</th>
</tr>
public function articlesajax()
{
$result = DB::table('articles')
->join('users', 'articles.user_id', '=', 'users.id')
->select('articles.id as id', 'articles.title as title', 'users.fullname', 'articles.created_at', 'articles.updated_at');
return Datatables::of($result)
->add_column('edit', '<a href="/admin/article_edit/{{ $id }}"><i class="icon-list-alt"></i>Szerkesztés</a>')
->add_column('delete', '<a href="/admin/article_delete/{{ $id }}"><i class="icon-trash"></i>Törlés</a>')
->make();
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-condensed table-bordered" id="articles">
<thead>
<tr>
<th>ID</th>
<th>Cím</th>
<th>Szerző</th>
<th>Létrehozva</th>
<th>Módosítva</th>
<th colspan=”2”>Műveletek</th>
</tr>
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-condensed table-bordered" id="articles">
<thead>
<tr>
<th>ID</th>
<th>Cím</th>
<th>Szerző</th>
<th>Létrehozva</th>
<th>Módosítva</th>
<th colspan=”2”>Műveletek</th>
</tr>
@subdesign
subdesign / gist:9217088
Created February 25, 2014 20:32
datatables
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-condensed table-bordered" id="articles">
<thead>
<tr>
<th>ID</th>
<th>Cím</th>
<th>Szerző</th>
<th>Létrehozva</th>
<th>Módosítva</th>
<th colspan=”2”>Műveletek</th>
</tr>
@subdesign
subdesign / gist:9034322
Created February 16, 2014 13:36
Faker 3
<?php
class DatabaseSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()