skip to Main Content

Update data with laravel

The problem arises when I use the "save" method to save the data, as it returns as undefined, this is the code : public function profile() { return view('profile.edit', ['user' => Auth::user()]); } public function update(Request $request) { $request->validate([ 'fullName'…

VIEW QUESTION

Locale not setting in Laravel 11 with Inertia.js

I am trying to set app locale in Laravel 11 with Inertia.js. Here is the links to set locale: <DropdownLink :href="route('set-language', { lang: 'lv' })"> <div class="flex items-center"> <img src="../../images/icons/latvian.png" :alt="$t('locales.lv')" height="25px" width="25px"> <span class="ml-2">{{ $t('locales.lv') }}</span> </div> </DropdownLink> <DropdownLink…

VIEW QUESTION

Laravel where condition within 'with'

I have an eloquent query: $cameras=Jump::Video() ->with('flight','flight.aircraft','flight.airfield') ->with('student','student.logininfo','student.logininfo.reservations') ->with('camera','camera.status') ->whereBetween('data',[ $from, $to]) ->orderBy($sortBy, $orderDesc) ->paginate($request->perPage); and relations between student, logininfo and reservations Model Jump.php public function scopeVideo($query) { return $query->where('exercise', '104'); } public function student() { return $this->hasOne('AppModelsPersonalData','id','student'); } Model…

VIEW QUESTION
Back To Top
Search