We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2025e3c commit 7f6f55eCopy full SHA for 7f6f55e
composer.json
@@ -21,5 +21,8 @@
21
"files": [
22
"helpers.php"
23
]
24
+ },
25
+ "require-dev": {
26
+ "fzaninotto/faker": "^1.6"
27
}
28
helpers.php
@@ -142,3 +142,18 @@ function base_layout_has($key)
142
return false;
143
144
145
+
146
+/**
147
+ * Returns a new faker instance for mocking content
148
+ *
149
+ * @return Faker\Generator
150
+ */
151
+if(!function_exists('base_faker_factory')) {
152
+ function base_faker_factory() {
153
+ if(!class_exists('Faker\Factory')) {
154
+ throw new Exception('Faker library is not installed - are you running in production?');
155
+ }
156
157
+ return Faker\Factory::create();
158
159
+}
0 commit comments