Category : updates

I wanna update score according to criteria using foreach, no problim when insert data, but when i update data, the result eror My View <div class="col-md-3"> <div class="form-group"> <input type="hidden" name="criteria_id[]" value="{{ $row->id_criteria }}"> { { $row->criteria_name}} : </div> </div> My Controller $criteria_ids = $request->criteria_id; foreach ($criteria_ids as $i => $criteria_id) { DB::table(‘detailscores’)->where(‘score_id’, $id)->update([ ‘score_id’ ..

Read more

I wanted to install Laravel Breeze using Composer but after running: composer require laravel/breeze –dev. I got an error as (Installation failed, reverting ./composer.json and ./composer.lock to their original content) I thought after running: composer update the problem will be solved but now the problem seem to have been resolve but all my code in ..

Read more

i want to update a first record status into ‘2’ based on button click. Here is my code : public function repay(Request $request,$loanid){ $obj = DB::table(‘schdls’) ->where(‘schdls.loanid’,’=’,$loanid) ->where(‘schdls.status’,’=’,1)->first(); $obj->status=’2′; $obj->save(); return redirect(‘/home’)->with(‘message’,’updated’); } But it says Call to undefined method stdClass::save() error, What am i missing? Sourc..

Read more

what happen to my update file? I can’t update file in my program, what’s wrong with my controller? edit.blade.php <div class="row"> <div class="col-12"> {{ Form::model($activityreports,[‘route’=>[‘activityreports.update’,$activityreports[‘id’]], ‘files’=>true, ‘method’=>’GET’, ‘enctype’=>’multipart/form-data’]) }} <div class="card"> <div class="card-body"> @if(!empty($errors->all())) <div class="alert alert-danger"> {{ Html::ul($errors->all())}} </div> @endif <div class="row"> <div class="col-md-6"> <div class="form-group"> {{ Form::label(‘file’, ‘Laporan Kegiatan’) }} {{ Form::file(‘file’, [‘class’=>’form-control’]) ..

Read more

I have a laravel project and it is in production and I want to upgrade composer from version 1.1.8.6 to 2.0.11 through the cpanel builtin terminal. Every time I type the following in the terminal: composer self-update I get the following output: updating to version 2.0.11 (stable channel). Downloading (100%) [ErrorException] rename(/opt/cpanel/composer/bin/composer): failed to open ..

Read more

In profile.blade, while updating the inputs in the profile getting Error The phone has already been taken. Controller: public function profileUpdate(Request $request) { $user = Auth::user(); $messages = [ ‘user_name.required’ => __(‘The User name field is required.’), ‘last_name.required’ => __(‘The Last Name field is required.’), ‘first_name.required’ => __(‘The First Name field is required.’), ‘phone.required’ => ..

Read more

I don’t understand where it is blocking, if I replace the update with create it works or if I remove the broadcast the update works how to update with the braodcast ?? thank you call to a member function load() on bool public function SendToMarket(Request $request, $id){ $card = auth()->user()->cards()->findOrFail($id)->update([ ‘market_id’ => $request["_market"], ‘borderStyle_id’ => ..

Read more

I have this two models : first for categories which connected with courses in id: <?php namespace AppModels; use IlluminateDatabaseEloquentFactoriesHasFactory; use IlluminateDatabaseEloquentModel; class Catagory extends Model { use HasFactory; protected $fillable = [ ‘catagory’, ]; public function Course() { return $this->hasMany(‘AppModelsCourse’); } } the course model have belong to catagory table : <?php namespace AppModels; ..

Read more