This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Controllers\Admin; | |
| use App\Http\Controllers\Controller; | |
| use App\Models\League; | |
| use Illuminate\Http\Request; | |
| use Illuminate\Support\Str; | |
| use Inertia\Inertia; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script setup> | |
| import AppLayout from '@/Layouts/AppLayout.vue' | |
| import { Head, Link, useForm } from '@inertiajs/vue3' | |
| import { computed } from 'vue' | |
| defineOptions({ layout: AppLayout }) | |
| const props = defineProps({ | |
| mode: { | |
| type: String, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Illuminate\Foundation\Application; | |
| use Illuminate\Support\Facades\Route; | |
| use Inertia\Inertia; | |
| use App\Http\Controllers\Admin\AdminGameController; | |
| use App\Http\Controllers\Admin\AdminImportController; | |
| use App\Http\Controllers\Admin\AdminLeagueController; | |
| use App\Http\Controllers\Admin\AdminOfficialController; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script setup> | |
| import AppLayout from '@/Layouts/AppLayout.vue' | |
| import { Head, Link, router } from '@inertiajs/vue3' | |
| import { ref, computed, watch } from 'vue' | |
| defineOptions({ layout: AppLayout }) | |
| const props = defineProps({ | |
| leagues: Object, // paginator | |
| filters: Object, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script setup> | |
| import AppLayout from '@/Layouts/AppLayout.vue' | |
| import { Head, Link, router } from '@inertiajs/vue3' | |
| import { ref, watch, computed } from 'vue' | |
| defineOptions({ layout: AppLayout }) | |
| const props = defineProps({ | |
| players: Object, // Laravel paginator | |
| filters: Object, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script setup> | |
| import AppLayout from '@/Layouts/AppLayout.vue'; | |
| import { Head, Link, router, usePage } from '@inertiajs/vue3'; | |
| import { ref, computed } from 'vue'; | |
| const props = defineProps({ | |
| teams: { | |
| type: Object, | |
| required: true, | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- For visitors / scouts --> | |
| <section> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-4"> | |
| <div class="rounded-2xl border border-slate-200 bg-white p-4 shadow-sm"> | |
| <h3 class="text-sm font-semibold text-slate-900"> | |
| Scouts & media | |
| </h3> | |
| <p class="mt-1 text-xs text-slate-500"> | |
| Use player and team pages to quickly assess talent, track trends and | |
| compare performance across leagues. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script setup> | |
| import AppLayout from '@/Layouts/AppLayout.vue' | |
| import { Head, Link, useForm } from '@inertiajs/vue3' | |
| import { computed } from 'vue' | |
| defineOptions({ layout: AppLayout }) | |
| const props = defineProps({ | |
| game: { type: Object, required: true }, | |
| statuses: { type: Array, required: true }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function updateRoster(Request $request, Game $game) | |
| { | |
| $this->authorize('update', $game); | |
| $data = $request->validate([ | |
| 'home_player_ids' => ['array'], | |
| 'home_player_ids.*' => ['integer', 'exists:players,id'], | |
| 'away_player_ids' => ['array'], | |
| 'away_player_ids.*' => ['integer', 'exists:players,id'], | |
| ]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function update(Request $request, Game $game) | |
| { | |
| $this->authorize('update', $game); | |
| $data = $request->validate([ | |
| 'status' => ['required', 'in:scheduled,finished'], | |
| 'venue' => ['nullable', 'string', 'max:120'], | |
| 'tipoff_at' => ['nullable', 'date'], | |
| 'home_score' => ['nullable', 'integer', 'min:0'], | |
| 'away_score' => ['nullable', 'integer', 'min:0'], |
NewerOlder