# Configuration

To make changes from this point, it is recommended to install Lodata's configuration into your application:

php artisan vendor:publish \
  --provider="Flat3\Lodata\ServiceProvider" \
  --tag="config"
1
2
3

The default configuration looks like this:

<?php

return [
    /**
     * The route prefix to use, by default mounted at http://localhost:8080/odata but can be moved and renamed as required.
     */
    'prefix' => env('LODATA_PREFIX', 'odata'),

    /*
     * An array of middleware to be included when processing an OData request. Common middleware used would be to handle JWT authentication, or adding CORS headers.
     */
    'middleware' => [],

    /*
     * Whether this service should allow data modification requests. Set to true by default just for safety.
     */
    'readonly' => true,

    /*
     * Set this to true if you want to use Laravel authorization gates for your OData requests.
     */
    'authorization' => false,

    /*
     * Whether to use streaming JSON responses by default.
     * @link https://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html#sec_PayloadOrderingConstraints
     */
    'streaming' => true,

    /*
     * This is an OData concept to group your data model according to a globally unique namespace. Some clients may use this information for display purposes.
     */
    'namespace' => env('LODATA_NAMESPACE', 'com.example.odata'),

    /*
     * The name of the Laravel disk to use to store asynchronously processed requests.
     * In a multi-server shared hosting environment, all hosts should be able to access this disk
     */
    'disk' => env('LODATA_DISK', 'local'),

    /*
     * Configuration relating to asynchronous request processing.
     */
    'async' => [
        /*
         * Set the desired queue for the job.
         */
        'queue' => env('LODATA_ASYNC_QUEUE'),

        /*
         * Set the desired connection for the job.
         */
        'connection' => env('LODATA_ASYNC_CONNECTION'),
    ],

    /*
     * Configuration relating to auto-discovery
     */
    'discovery' => [
        /*
         * The blacklist of property names that will not be added during auto-discovery
         */
        'blacklist' => [
            'password',
            'api_key',
            'api_token',
            'api_secret',
            'secret',
        ]
    ]
];
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71