Commit 4e97b6f1 authored by Waterfox's avatar Waterfox
Browse files

Refactor DataBoatController and add new routes for data controllers

parent 175042a5
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
<?php

namespace App\Http\Controllers;
namespace App\Http\Controllers\DataController;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Boat;

class DataBoatController extends Controller
{
    public static function fetch()
    {
        
        $boatData = Boat::all();
        return $boatData;
    }
}
+16 −0
Original line number Diff line number Diff line
<?php

namespace App\Http\Controllers\DataController;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\DivingGroup;

class DataDivingGroupController extends Controller
{
    public static function fetch()
    {
        $divingGroupData = DivingGroup::all();
        return $divingGroupData;
    }
}
+16 −0
Original line number Diff line number Diff line
<?php

namespace App\Http\Controllers\DataController;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\DivingLocation;

class DataDivingLocationController extends Controller
{
    public static function fetch()
    {
        $divingLocation = DivingLocation::all();
        return $divingLocation;
    }
}
+16 −0
Original line number Diff line number Diff line
<?php

namespace App\Http\Controllers\DataController;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\DivingSession;

class DataDivingSessionController extends Controller
{
    public static function fetch()
    {
        $divingSessionData = DivingSession::all();
        return $divingSessionData;
    }
}
+15 −0
Original line number Diff line number Diff line
<?php

namespace App\Http\Controllers\DataController;

use App\Http\Controllers\Controller;
use App\Models\Prerogative;

class DataPrerogativeController extends Controller
{
    public static function fetch()
    {
        $prerogative = Prerogative::all();
        return $prerogative;
    }
}
Loading