Merge branch 'master' of https://github.com/sebathefox/skolehjem-webapp
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Console;
|
||||
|
||||
use App\Console\Commands\GenerateRoutesForJavascript;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
@@ -13,7 +14,7 @@ class Kernel extends ConsoleKernel
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
//
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -153,4 +153,16 @@ class WashingReservationController extends Controller
|
||||
|
||||
return redirect()->route("washing-reservations.index", [ "reservations" => $reservations]);
|
||||
}
|
||||
|
||||
public function api(Request $request){
|
||||
if($request->ajax()){
|
||||
$date = $request->date;
|
||||
|
||||
$machines = WashingMachine::all();
|
||||
|
||||
$output = json_encode(['date' => $date, 'washingmachines' => $machines]);
|
||||
return Response($output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user