Skip to content

Instantly share code, notes, and snippets.

David DavidStrada

Block or report user

Report or block DavidStrada

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DavidStrada
DavidStrada / AppServiceProvider.php
Created May 16, 2019 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
View AppServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
View settings.yaml
fields:
test_addon:
type: test
validate: required
View settings.yaml
fields:
mailchimp_key:
type: text
validate: required
user_section:
type: section
display: Users
add_new_users:
type: toggle
display: Add New Users?
View styles.scss
// Theme Styles
@import 'theme/style';
View many_to_many.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Article extends Model
{
protected $fillable = ['name', 'content'];
View many_to_many.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Article extends Model
{
protected $fillable = ['name', 'content'];
View hasManyExample.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Article extends Model
{
protected $fillable = ['name', 'content'];
View promise-all.js
var p1 = new Promise((resolve, reject) => {
setTimeout(resolve, 1000, "one");
});
var p2 = new Promise((resolve, reject) => {
setTimeout(resolve, 2000, "two");
});
var p3 = new Promise((resolve, reject) => {
setTimeout(resolve, 3000, "three");
});
var p4 = new Promise((resolve, reject) => {
View bootstrap_overwrite_options.json
{
"npm:bootstrap@4.0.0-alpha.2": {
"files": [ "dist", "fonts", "js", "sass", "package.json" ],
"main": "js/bootstrap",
"shim": {
"js/bootstrap": {
"deps": [ "jquery" ], "exports": "$"
},
"deps": ["thether"],
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://dimplejs.org/dist/dimple.v2.1.6.min.js"></script>
<style id="jsbin-css">
.dimple-example {
You can’t perform that action at this time.