Closes #137 - fast component status updates.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
class DashAPIController extends Controller
|
||||
{
|
||||
/**
|
||||
* Updates a component with the entered info.
|
||||
* @param Component $component
|
||||
* @return array
|
||||
*/
|
||||
public function postUpdateComponent(Component $component)
|
||||
{
|
||||
$componentData = Input::all();
|
||||
unset($componentData['_token']);
|
||||
if ($component->update($componentData))
|
||||
{
|
||||
return $component;
|
||||
}
|
||||
else
|
||||
{
|
||||
App::abort(500);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,10 @@ class DashboardController extends Controller
|
||||
public function showDashboard()
|
||||
{
|
||||
// TODO: Find steps needed to complete setup.
|
||||
return View::make('dashboard.index');
|
||||
$components = Component::all();
|
||||
return View::make('dashboard.index')->with([
|
||||
'components' => $components
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user