This is my upload-file
type for what I use at work. We use angular-upload for the upload
service to do the actual file uploading. We also have several abstractions and use ES6 that may confuse you a little bit (sorry about that). Hopefully this gets you started though.
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
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |
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 () { | |
'use strict'; | |
// Relevant resource: https://gist.github.com/spencermefford/bc73812f216e0e254ad1 | |
module.exports = function (server, callback) { | |
var ACL = server.models.ACL, | |
User = server.models.User, | |
Role = server.models.Role, | |
RoleMapping = server.models.RoleMapping; |
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 | |
/** | |
* 异常处理类 | |
*/ | |
use \Illuminate\Contracts\Debug\ExceptionHandler; | |
class MyQueueException implements ExceptionHandler | |
{ | |
/** |
Implementation of the Node module resolution algorithm (aka require.resolve()
) in PHP.
Depends on league/flysystem
and illuminate/support
.
use League\Flysystem\Filesystem;
use League\Flysystem\Adapter\Local;
OlderNewer