Skip to content

Instantly share code, notes, and snippets.

View sineld's full-sized avatar
🏢
Full Stack Developer

Sinan Eldem sineld

🏢
Full Stack Developer
View GitHub Profile
@msurguy
msurguy / DB.sql
Last active August 20, 2023 18:02
Dynamic dropdown in Laravel, let's say you have multiple drop downs (selects), you click on one and the contents of the other need to be dynamically changed. One solution is to dynamically load JSON from the API and change the dropdown dynamically depending on the user choice.
CREATE TABLE `makers` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
@sineld
sineld / DB.sql
Created March 12, 2013 08:12 — forked from msurguy/DB.sql
CREATE TABLE `makers` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
@akuzemchak
akuzemchak / l4project.sh
Last active November 16, 2023 08:48
New L4 project with clean history
# Initial setup
git clone -o framework -b develop https://github.com/laravel/laravel.git project-name
cd project-name
git checkout --orphan master
git commit -m "Initial commit"
# Pulling changes
git fetch framework
git merge --squash -m "Upgrade Laravel" framework/develop
# Fix merge conflicts if any and commit
@barryvdh
barryvdh / laravel4_codeintel_helper.php
Last active June 8, 2020 06:46
Laravel 4 IDE Helper; CodeIntel version, generated using https://github.com/barryvdh/laravel-ide-helper (With the sublime option)
<?php
/**
* An helper file for Laravel 4, to provide autocomplete information to your IDE
* Generated with https://github.com/barryvdh/laravel-ide-helper
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
*/
// This is now merged with: https://gist.github.com/barryvdh/5227822
// The same format is used for phpStorm, netBeans and Sublime Text Codeintel!
<?php
define('DB_NAME', 'putyourdbnamehere'); // 数据库名
define('DB_USER', 'usernamehere'); // MySQL用户名
define('DB_PASSWORD', 'yourpasswordhere'); // 密码
define('DB_HOST', 'localhost'); // 很大可能你无需修改此项
function UTF8_DB_Converter_DoIt() {
$tables = array();
$tables_with_fields = array();
<?php
// app/start/global.php
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
@paulund
paulund / add-option-to-dropdown.js
Created June 25, 2013 18:50
Add and Remove Options in Select using jQuery
$("#selectBox").append('<option value="option6">option6</option>');
@sineld
sineld / sublimeText2-3.settings
Last active December 19, 2015 13:49
sublimeText2-3.settings
{
"auto_complete": true,
"auto_complete_selector": "source, text",
"color_scheme": "Packages/Dayle Rees Color Schemes/FreshCut.tmTheme",
"ensure_newline_at_eof_on_save": false,
"fallback_encoding": "Turkish (Windows 1254)",
"folder_exclude_patterns":
[
".svn",
".hg",
@tobysteward
tobysteward / BlogController.php
Last active March 4, 2024 23:11
Laravel AJAX Pagination with JQuery
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
@yahyaerturan
yahyaerturan / tr_countries.sql
Last active March 11, 2022 09:57
Türkçe Ülkeler MySQL Tablosu
CREATE TABLE IF NOT EXISTS `countries_list` (
`id_country` tinyint(3) unsigned NOT NULL auto_increment,
`country_name` varchar(30) collate utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id_country`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=207 ;
--
-- Dumping data for table `countries_list`
--