I have a post system, where i want use a ajax. But, there i have a little problem.
$post = new Post; $post->title = Input::get('title', 'N/A'); $post->content = Input::get('content'); $post->author = Auth::user()->id; $post->save();
So, this doesn't work when i use ajax.. I mean: On Ajax call, with Auth::user()->id, jQuery gets a 500 error, but without Auth::user.... working perfectly. How i can solve this problem?