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 AuthService { | |
// ---- | |
public function issueToken(array $credentials) | |
{ | |
$token = $this->apiGuard()->attempt($credentials); | |
throw_if(!$token, InvalidCredentials::class); |
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
const path = require('path'); | |
const { mixFn } = require('./mix'); | |
// mixFn will parse and store the manifest file internally | |
// it returns a new | |
const mix = mixFn(path.join(__dirname, 'public')); // where laravel-mix generates the manifest and hot files | |
console.log(mix('/css/app.css')); // /css/app.css?id=2995d68b12d2d1326355 | |
console.log(mix('/js/js.css')); // /js/app.js?id=87e01f645f82f2f01ab3 |
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
module.exports = (knex) => { | |
return async (query, options) => { | |
const perPage = options.perPage || 10; | |
let page = options.page || 1; | |
const countQuery = knex.count('* as total').from(query.clone().as('inner')); | |
if (page < 1) { | |
page = 1; | |
} |