Skip to content
Permalink
Browse files

better docblocks

  • Loading branch information...
imanghafoori1 committed Aug 2, 2019
1 parent cc8b8dd commit 223e30a3d60accd4b626f1aa261c9ed056273900
Showing with 3 additions and 4 deletions.
  1. +3 −4 stubs/widget.stub
@@ -21,22 +21,21 @@ class DummyClass
{
/**
* You may call this widget in any blade files like this :
*
* @widget('DummyClass', ['a' => 'someVal', 'b' => 'foo'])
*/
public function data($a, $b)
{
return [];
}


/**
* If the widget output depends on query strings you should return key names.
* otherwise you get undesired results out of the cache store. for example:
* example.com/product?page=1 and you use the page number in your db query
* or if you want it to be separated for each user: return auth()->id();
*/
public function extraCacheKeyDependency()
public function extraCacheKeyDependency($args)
{
return [/*'page'*/];
return [/* request('page') */];
}
}

0 comments on commit 223e30a

Please sign in to comment.
You can’t perform that action at this time.