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 { ServiceProvider } = require('@adonisjs/fold') | |
| class SettingsProvider extends ServiceProvider { | |
| register () { | |
| // Register Model | |
| this.app.singleton('Renka/Setting/Model', () => { | |
| const Option = require('./Models/Option') | |
| Option._bootIfNotBooted() | |
| return Option | |
| }) |
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 { ServiceProvider } = require('@adonisjs/fold') | |
| class SettingsProvider extends ServiceProvider { | |
| register () { | |
| // Register Model | |
| this.app.bind('Renka/Setting/Model', () => require('./Models/Option')) | |
| this.app.singleton('Renka/SettingManager', () => { | |
| // Todo: Use Config | |
| return new (require('./SettingsManager.js'))({ preload: true }) | |
| }) |
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
| { | |
| "name": "ecommerce", | |
| "version": "4.0.0", | |
| "adonis-version": "4.0.0", | |
| "description": "The fullstack application boilerplate for Adonisjs", | |
| "main": "index.js", | |
| "scripts": { | |
| "start": "node server.js", | |
| "test": "node ace test --timeout=0", | |
| "dev": "adonis serve --dev --watch=app,config,start", |
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 URLpattern = /http(?:s)?:\/\/|www\./g | |
| //bunch of crap code starts here | |
| // i will refactor this next year :D | |
| function generateBC(url, separator) { | |
| var url = url.replace(URLpattern, ''); | |
| const urlArr = parseURL(url); | |
| var path = finalClean(urlArr.path); | |
| const pathLength = path.length; | |
| var output = ""; |
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
| <template> | |
| <b-modal @ok="submitCategory" @hidden="$store.dispatch('modals/toggleModal', 'categoryModal')" :visible="$store.state.modals.categoryModal" :title="title"> | |
| <b-form> | |
| <b-form-group label="Name"> | |
| <b-form-input @input="changeSlug" type="text" v-model="category.name" required/> | |
| </b-form-group> | |
| <b-form-group label="Slug"> | |
| <b-form-input type="text" v-model="category.slug" required/> | |
| </b-form-group> |
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 Additional_Duplicating_Price { | |
| private $duplicating_field = 'duplicating'; | |
| private $free_from = 8; | |
| private $duplicating_price = 1; | |
| public function __construct() { |
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 Service = require('./Service') | |
| const createThrottle = require('async-throttle') | |
| class CreateRest extends Service { | |
| constructor () { | |
| super() | |
| this.content = { | |
| body: { wtf: 'fwef' } | |
| } | |
| } |
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 iconic_output_engraving_field() { | |
| global $product; | |
| if ( ! check_user_role( 'gewerbe' ) ) | |
| return; | |
| ?> | |
| <hr> | |
| <div class="iconic-engraving-field"> | |
| <p class="form-row legal terms wc-terms-and-conditions"> | |
| <input type="checkbox" class="input-checkbox" name="duplicating" id="duplicating"> |
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
| if (!content.hasOwnProperty('checksum_type')) { | |
| return { | |
| forPaypal () { | |
| console.log(content) | |
| }, | |
| forSofort () {} | |
| } | |
| } |
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
| var UserService = make('App/Services/UserService') | |
| class AuthController { | |
| async login ({ request, response, auth }) { | |
| UserService.demo() | |
| const { email, password } = request.all() | |
| try { | |
| const token = await auth.attempt(email, password) | |
| response.send(token) | |
| } catch (error) { |