Skip to content

Commit 047306e

Browse files
committed
fix errors and typos
1 parent 016392f commit 047306e

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,45 @@ composer require headerx/laravel-iframes
1717
You can publish views with:
1818

1919
```bash
20-
php artisan vendor:publish --provider="HeaderX\Iframes\IframesServiceProvider" --tag="views"
20+
php artisan vendor:publish --provider="HeaderX\Iframes\IframesServiceProvider" --tag="iframes-views"
2121
```
2222

2323
You can publish the config file with:
2424
```bash
25-
php artisan vendor:publish --provider="HeaderX\Iframes\IframesServiceProvider" --tag="laravel-iframes-config"
25+
php artisan vendor:publish --provider="HeaderX\Iframes\IframesServiceProvider" --tag="iframes-config"
2626
```
2727

2828
This is the contents of the published config file:
2929

3030
```php
3131
return [
32+
'theme' => 'jetstream',
33+
34+
'middleware' => [
35+
'web',
36+
'auth',
37+
],
38+
39+
/**
40+
* The Route prefix under which views should be loaded in an iframe.
41+
* This can be useful when you want to keep the appearance of the
42+
* but the view contains css or javascript which is incompatible.
43+
*/
44+
'internal_iframe_prefix' => env('INTERNAL_IFRAME_PREFIX', 'iframes'),
45+
46+
/**
47+
* The Route prefix under which to load external iframes,
48+
* such as from subdomains, static sites, or services
49+
* running on another backend platform or framework
50+
*/
51+
'external_iframe_prefix' => env('EXTERNAL_IFRAME_PREFIX', 'extras'),
52+
53+
/**
54+
* The key in the query string which will
55+
* be used to load external sites inside
56+
* an iframe.
57+
*/
58+
'external_link_key' => env('EXTERNAL_LINK_KEY', '?external_link='),
3259
];
3360
```
3461

src/Http/Controllers/ExternalIframeController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class ExternalIframeController
88
{
99
public function __invoke(Request $request)
1010
{
11-
if ($request->has(str_replace(['?', '='], '', config('iframes.external_link_query')))) {
12-
$iframeSource = $request->{str_replace(['?', '='], '', config('iframes.external_link_query'))};
11+
if ($request->has(str_replace(['?', '='], '', config('iframes.external_link_key')))) {
12+
$iframeSource = $request->{str_replace(['?', '='], '', config('iframes.external_link_key'))};
1313

1414
return view('laravel-iframes::'.config('iframes.theme').'.external-iframe', ['iframeSource' => $iframeSource]);
1515
}

0 commit comments

Comments
 (0)