I have a source code witch wrote by PHP and laravel framework. at first, I did not know this project was written in PHP 7.4.12, and in my local computer PHP 7.4.26 was installed so everything was fine till I want to add some features for the pdf generator in my project. I realize some ..

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’ ..

how to combine POST and UPDATE commands in one action in laravel 8 with ajax? I have one column "status" in another table that I need to update when I save the data. in this case basically I have two different tables… thank you for your answer! Sourc..

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 ..

I have a problem. When adding choices or where there are more choices of questions and answers. Results for saved selections but not saved questions. For example, there are 6 choices, while for questions and answers there are 5 that I want when I update the questions and answers, there are only 5, while for ..

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..

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’]) ..

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 ..

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’ => ..

I am wondering if the updateOrCreate method in Laravel has a way to skip some information in case the record exists in the database. For example, I wanna be able to search for users, and assign a password if the user is to be created, but not if the user already exists. Say, I have ..

I have a modal in which I want to update my Question but the modal keeps updating the same question so can someone help me because my modal keeps taking the same $id even if I click on different entries. This is my QuestionController public function update($questionId) { $this->validate(request(),[ ‘label’ => ‘required’, ]);$data = ..

I tried to update a record with this code but no success, i have this error message … this is probably not the right method public function update(Request $request, int$id) { // dd($id,$request); $article_data = array(); foreach ($this -> locales as $locale) {$article_data[ $locale ] = array( ‘title’ =>$request -> input( ..

here is the error essage composer update [ErrorException] Trying to access array offset on value of type null It appears after an upgrade of php to version 7.4.12 (I ran debian stretch apt-get upgrade), I update my composer.json with this same version and I still have the problem "require": { "php": ">=7.4", "laravel/framework": "5.6.*", "laravel/tinker": ..

Hi i want to ecnrypt some field in database when user create or edit data. IF create, the encryption work, but when user edit data, the value that save in database will be normal text not encrypted <?php namespace AppTraits; use Crypt; trait Encryptable { public function toArray() { $array = parent::toArray(); foreach ($array as ..

Hi i want to encrypt some field in database when user create or edit data. IF create, the encryption work, but when user edit data, the value that save in database will be normal text not encrypted <?php namespace AppTraits; use Crypt; trait Encryptable { public function toArray() { $array = parent::toArray(); foreach ($array as ..

my table : CREATE TABLE my_table ( my_id int(10), my_id_row int(10), created_at timestamp, updated_at timestamp ) I wanna ask how to update the multiple data with multiple id in mysql first, cause when I update the data with multiple row and multiple where condition the data just update in last row, for the query in ..

I’m so confused in here, when I wanna make my data to updating to new data the result is always to be one data and the result is not array, like this : when the query is not combine with update method : public function updateData(Request $dataRequest,$myId) { $idUpdate = explode(",",$myId); $updateQuery = .. Read more i want to change the attribute "cantidad" inside my session(‘cart’) through a post form which have a input type="num" that will have the quantity to change on the session. But i cant change it with success , it doesnt do nothing. Session Code And the Update Code Where im wrong? Sorry for ask this , .. 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; ..