It would be nice if we had a plugin that allows Laravel to play nice with Ember. Put simply I would like to create an easy way for Laravel to output JSON strings in a way that Ember likes.
return Model::find($id);
<html> | |
<head> | |
<title>FilePicker Test Drive</title> | |
</head> | |
<body> | |
<input class="picker" name="myName"/> | |
<input type="text" class="naed" value="NONE"/> | |
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> |
Route::get('blog/{slug}', function($slug) { | |
return View::make('hello'); | |
})->where('slug', '[a-zA-Z0-9]+'); |
<div class="flip"> | |
<div class="card"> | |
<div class="face front"> | |
Front | |
</div> | |
<div class="face back"> | |
Back | |
</div> | |
</div> | |
</div> |
<?php | |
class Users_Controller extends Base_Controller { | |
public function action_index() { | |
$id = Input::get('id'); | |
if ($id) { | |
$user = DB::table('users')->where('id', $id)->first(); | |
jQuery(document).ready(function($) { | |
// Inside of this function, $() will work as an alias for jQuery() | |
// and other libraries also using $ will not be accessible under this shortcut | |
}); |
<div class="myBox"> | |
blah blah blah. | |
<a href="http://google.com">link</a> | |
</div> |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> |
$(function() { | |
$.ajaxSetup({ | |
error: function(jqXHR, exception) { | |
if (jqXHR.status === 0) { | |
alert('Not connect.\n Verify Network.'); | |
} else if (jqXHR.status == 404) { | |
alert('Requested page not found. [404]'); | |
} else if (jqXHR.status == 500) { | |
alert('Internal Server Error [500].'); | |
} else if (exception === 'parsererror') { |
var myPlaylist = new jPlayerPlaylist({ | |
//then this will capture the current song's title: | |
//myPlaylist.playlist[myPlaylist.current].title | |
//For instance, I used this to capture the current song's title and insert it into a div on my page with id 'current-track': | |
var myPlaylist = new jPlayerPlaylist({ the playlist }); | |
$("#jquery_jplayer_1").bind($.jPlayer.event.play, function(event) { |