File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 4
4
* Generators
5
5
*
6
6
* An array of classes to use in generating body classes.
7
+ *
8
+ * Simply add a class which implements the following abstract class:
9
+ * \Zschuessler\RouteToClass\Generators\GeneratorAbstract
10
+ *
11
+ * You can put this class anywhere you wish. As an example:
12
+ * app/Providers/RouteToClass/Generators/MyCustomGeneratorName.php
13
+ *
14
+ * You may also interact with the RouteToClass provider directly instead, bypassing
15
+ * the requirement for adding generators here. Note that doing this may lead to technical debt,
16
+ * and that adding generators is the preferred method for long-term maintenance goals.
17
+ *
18
+ * Example of ad-hoc solution:
19
+ *
20
+ * ```
21
+ * $routeToClassProvider = app()['route2class'];
22
+ * $routeToClassProvider->addClass('test-class');
23
+ * $routeToClassProvider->addClass(function() {
24
+ * // Your own custom logic
25
+ * return 'test-class-custom-logic';
26
+ * });
27
+ * ```
7
28
*/
8
29
'generators ' => [
9
30
/**
You can’t perform that action at this time.
0 commit comments