This file contains 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 | |
$capsule = new Capsule; // when used standalone, or Illuminate\Database\Capsule\Manager when used directly from the framework | |
$capsule->addConnection([ | |
'driver' => 'mysql', | |
'host' => 'localhost', | |
'database' => 'illuminate_non_laravel', | |
'username' => 'root', | |
'password' => '', | |
'charset' => 'utf8', |
This file contains 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 | |
require 'autoload.php'; // they're setting cwd to root | |
use Doctrine\ORM\Tools\Console\ConsoleRunner; | |
use Controllers\Bootstrap; | |
$app = new Bootstrap(''); |
This file contains 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
->createQueryBuilder() | |
->select('u')->from(User::class, 'u') | |
->where('u.email = ?1')->setParameter(1, pull email from payloadStorage]) |
This file contains 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 FormActivity = (() => { | |
/* | |
* | |
* @description: Defines interaction with admin panel components, back and forth the server and conversion of the resonse into pretty fields | |
* | |
* @param: {statusContainer} Selector where the status of next activity will be displayed | |
* @param: {toRemove} fields in the returned data to not create inputs for | |
* @param: {addMore} will place a button beside these inputs to append more | |
* @param: {folderRoot} set to remote url if your back end lives on another domain | |
* |
This file contains 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
dashboard | |
- summary statistical charts | |
- transaction tables | |
- abandoned orders table | |
- product review section | |
user management | |
- vendors page | |
- buyer page |
This file contains 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
import 'dart:async'; | |
import 'dart:convert'; | |
import 'package:firebase_core/firebase_core.dart'; | |
import 'package:firebase_messaging/firebase_messaging.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:http/http.dart' as http; | |
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; |
This file contains 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
<script> | |
var promoInfos = { | |
promo: 'Product will be added to Promo page', | |
store: 'Discount must be above 30%' | |
}, | |
promoFieldAdded = false, | |
temp = $('.sales-type-template.original'), |
This file contains 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 mix = require('laravel-mix')/*, | |
WorkboxWebpackPlugin = require("workbox-webpack-plugin")*/; | |
var path = require("path") | |
/* | |
|-------------------------------------------------------------------------- | |
| Mix Asset Management | |
|-------------------------------------------------------------------------- | |
| | |
| Mix provides a clean, fluent API for defining some Webpack build steps |
This file contains 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 Activity { | |
public function trending (int $totalCount, string $paginationName) { | |
$ratioPaginate = function($builder, $ratio) use ($totalCount, $paginationName) { | |
return $builder->paginate(round(($ratio/5)*$totalCount), ['*'], $paginationName); | |
}; |
This file contains 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
export default { | |
props : ['products', 'load_more_link', 'lazy_load', 'fetch_name'], | |
components: {DefaultCard}, | |
data() { | |
return { | |
loading: false, nextPageUrl: this.load_more_link, |