Commit 2c97d0d8 authored by Julien Sailly's avatar Julien Sailly
Browse files

Merge branch 'dive-list'

parents bbe55d24 c283b694
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
<?php

namespace App\Http\Controllers;

use App\Models\DivingSession;
use Illuminate\View\View;

class DivesList extends Controller
{
    function index(): View
    {
        $dives = DivingSession::select('car_diving_session.DL_ID', 'DS_DATE', 'DL_DEPTH', 'CAR_SCHEDULE', 'DL_NAME')
            ->join('car_diving_location', 'car_diving_session.DL_ID', '=', 'car_diving_location.DL_ID')
            ->get();
        return view('dives', ['dives' => $dives]);
    }
}
+23 −0
Original line number Diff line number Diff line
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

/**
 * @method static select(string $string, string $string1, string $string2, string $string3, string $string4)
 */
class DivingSession extends Model
{
    protected $table = 'car_diving_session';
    protected $primaryKey = 'ds_code';
    protected $keyType = 'string';
    public $timestamps = false;

    /*protected $attributes = [
        'DS_CODE' => 'test'
    ];*/

    use HasFactory;
}

package-lock.json

0 → 100644
+9215 −0

File added.

Preview size limit exceeded, changes collapsed.

+3 −0
Original line number Diff line number Diff line
<button class="bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded inline-flex items-center">
    {{ $slot }}
</button>
+1 −0
Original line number Diff line number Diff line
<h1 class="mb-6 ml-3 font-bold md:text-5xl lg:text-6xl underline underline-offset-8">{{ $slot }}</h1>
Loading