Skip to content

Commit

Permalink
Added php to javascript transformer.
Browse files Browse the repository at this point in the history
  • Loading branch information
rappasoft committed Jul 31, 2015
1 parent 29dd093 commit 06b9fe2
Show file tree
Hide file tree
Showing 8 changed files with 232 additions and 118 deletions.
4 changes: 4 additions & 0 deletions app/Http/Controllers/Frontend/FrontendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class FrontendController extends Controller {
*/
public function index()
{
javascript()->put([
'test' => 'it works!'
]);

return view('frontend.index');
}

Expand Down
11 changes: 11 additions & 0 deletions app/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,15 @@ function access()
{
return app('access');
}
}

if ( ! function_exists('javascript'))
{
/**
* Access the javascript helper
*/
function javascript()
{
return app('JavaScript');
}
}
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"twbs/bootstrap": "3.*",
"twbs/bootstrap-sass": "3.*",
"fortawesome/font-awesome": "4.*",
"hieu-le/active": "~2.0"
"hieu-le/active": "~2.0",
"laracasts/utilities": "~2.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
Expand Down
Loading

0 comments on commit 06b9fe2

Please sign in to comment.