You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, the `view`, `create`, `update`, and `delete` abilities will be defined. You may define additional abilities by passing an array as third argument to the `resource` method. The key of the array defines the name of the ability while the value defines the method name:
Copy file name to clipboardExpand all lines: broadcasting.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -287,7 +287,18 @@ By default, each broadcast event is placed on the default queue for the default
287
287
* @var string
288
288
*/
289
289
public $broadcastQueue = 'your-queue-name';
290
+
291
+
If you want to broadcast your event using the `sync` queue instead of the default queue driver, you can implement the `ShouldBroadcastNow` interface instead of `ShouldBroadcast`:
290
292
293
+
<?php
294
+
295
+
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
296
+
297
+
class ShippingStatusUpdated implements ShouldBroadcastNow
Copy file name to clipboardExpand all lines: csrf.md
+5-9Lines changed: 5 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,15 +21,9 @@ Anytime you define a HTML form in your application, you should include a hidden
21
21
22
22
The `VerifyCsrfToken`[middleware](/docs/{{version}}/middleware), which is included in the `web` middleware group, will automatically verify that the token in the request input matches the token stored in the session.
23
23
24
-
#### CSRF Tokens & Vue
24
+
#### CSRF Tokens & JavaScript
25
25
26
-
If you are using the [Vue](https://vuejs.org) JavaScript framework without the authentication scaffolding provided by the `make:auth` Artisan command, you will need to manually define a `Laravel` JavaScript object in your primary application layout. This object specifies the CSRF token Vue should use when making requests:
27
-
28
-
<script>
29
-
window.Laravel = {!! json_encode([
30
-
'csrfToken' => csrf_token(),
31
-
]) !!};
32
-
</script>
26
+
When building JavaScript driven applications, it is convenient to have your JavaScript HTTP library automatically attach the CSRF token to every outgoing request. By default, the `resources/assets/js/bootstrap.js` file registers the value of the `csrf-token` meta tag with the Axios HTTP library. If you are not using this library, you will need to manually configure this behavior for your application.
33
27
34
28
<aname="csrf-excluding-uris"></a>
35
29
## Excluding URIs From CSRF Protection
@@ -71,9 +65,11 @@ Then, once you have created the `meta` tag, you can instruct a library like jQue
71
65
}
72
66
});
73
67
68
+
> {tip} By default, the `resources/assets/js/bootstrap.js` file registers the value of the `csrf-token` meta tag with the Axios HTTP library. If you are not using this library, you will need to manually configure this behavior for your application.
69
+
74
70
<aname="csrf-x-xsrf-token"></a>
75
71
## X-XSRF-TOKEN
76
72
77
73
Laravel stores the current CSRF token in a `XSRF-TOKEN` cookie that is included with each response generated by the framework. You can use the cookie value to set the `X-XSRF-TOKEN` request header.
78
74
79
-
This cookie is primarily sent as a convenience since some JavaScript frameworks, like Angular, automatically place its value in the `X-XSRF-TOKEN` header.
75
+
This cookie is primarily sent as a convenience since some JavaScript frameworks and libraries, like Angular and Axios, automatically place its value in the `X-XSRF-TOKEN` header.
Copy file name to clipboardExpand all lines: homestead.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -268,6 +268,18 @@ Homestead supports several types of sites which allow you to easily run projects
268
268
269
269
The available site types are: `apache`, `laravel` (the default), `proxy`, `silverstripe`, `statamic`, and `symfony2`.
270
270
271
+
<aname="site-parameters"></a>
272
+
#### Site Parameters
273
+
274
+
You may add additional Nginx `fastcgi_param` values to your site via the `params` site directive. For example, we'll add a `FOO` parameter with a value of `BAR`:
275
+
276
+
sites:
277
+
- map: homestead.app
278
+
to: /home/vagrant/Code/Laravel/public
279
+
params:
280
+
- key: FOO
281
+
value: BAR
282
+
271
283
<aname="configuring-cron-schedules"></a>
272
284
### Configuring Cron Schedules
273
285
@@ -299,8 +311,8 @@ By default, the following ports are forwarded to your Homestead environment:
299
311
If you wish, you may forward additional ports to the Vagrant box, as well as specify their protocol:
Copy file name to clipboardExpand all lines: mix.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ Because Laravel Mix is built on top of Webpack, it's important to understand a f
166
166
background: url('../images/example.png');
167
167
}
168
168
169
-
> {note} Absolute paths for `url()`s will be excluded from URL-rewriting. For example, `url('/images/thing.png')` or `url('http://example.com/images/thing.png')` won't be modified.
169
+
> {note} Absolute paths for any given `url()` will be excluded from URL-rewriting. For example, `url('/images/thing.png')` or `url('http://example.com/images/thing.png')` won't be modified.
170
170
171
171
By default, Laravel Mix and Webpack will find `example.png`, copy it to your `public/images` folder, and then rewrite the `url()` within your generated stylesheet. As such, your compiled CSS will be:
172
172
@@ -181,7 +181,7 @@ As useful as this feature may be, it's possible that your existing folder struct
181
181
processCssUrls: false
182
182
});
183
183
184
-
With this addition to your `webpack.mix.js` file, Mix will no longer match `url()`s or copy assets to your public directory. In other words, the compiled CSS will look just like how you originally typed it:
184
+
With this addition to your `webpack.mix.js` file, Mix will no longer match any `url()` or copy assets to your public directory. In other words, the compiled CSS will look just like how you originally typed it:
0 commit comments