Jump to content


  • Posts

  • Joined

  • Last visited

About ali_254

  • Birthday 05/07/1991

Profile Information

  • Gender

ali_254's Achievements

Regular Member

Regular Member (3/5)



  1. hi... i install xampp and composer in Ubuntu and i want install laravel with this code: composer create-project laravel/laravel example-app but i Received this error: Your requirements could not be resolved to an installable set of packages. Problem 1 - phpunit/phpunit[9.3.3, ..., 9.5.x-dev] require ext-dom * -> it is missing from your system. Install or enable PHP's dom extension. - Root composer.json requires phpunit/phpunit ^9.3.3 -> satisfiable by phpunit/phpunit[9.3.3, ..., 9.5.x-dev]. To enable extensions, verify that they are enabled in your .ini files: - /etc/php/7.4/cli/php.ini - /etc/php/7.4/cli/conf.d/10-opcache.ini - /etc/php/7.4/cli/conf.d/10-pdo.ini - /etc/php/7.4/cli/conf.d/20-calendar.ini - /etc/php/7.4/cli/conf.d/20-ctype.ini - /etc/php/7.4/cli/conf.d/20-exif.ini - /etc/php/7.4/cli/conf.d/20-ffi.ini - /etc/php/7.4/cli/conf.d/20-fileinfo.ini - /etc/php/7.4/cli/conf.d/20-ftp.ini - /etc/php/7.4/cli/conf.d/20-gettext.ini - /etc/php/7.4/cli/conf.d/20-iconv.ini - /etc/php/7.4/cli/conf.d/20-json.ini - /etc/php/7.4/cli/conf.d/20-mbstring.ini - /etc/php/7.4/cli/conf.d/20-phar.ini - /etc/php/7.4/cli/conf.d/20-posix.ini - /etc/php/7.4/cli/conf.d/20-readline.ini - /etc/php/7.4/cli/conf.d/20-shmop.ini - /etc/php/7.4/cli/conf.d/20-sockets.ini - /etc/php/7.4/cli/conf.d/20-sysvmsg.ini - /etc/php/7.4/cli/conf.d/20-sysvsem.ini - /etc/php/7.4/cli/conf.d/20-sysvshm.ini - /etc/php/7.4/cli/conf.d/20-tokenizer.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode. please guide me. my php version is 7.4.16
  2. thanks... we can use from this cod: DB::table('posts') ->where('id' , $id) ->increment('counter', 1);
  3. ok thanks , but this procedure use in 'Pure PHP' ! . i want update database in laravel framework and this Command Will not work! i use from query builder in laravel
  4. ok thanks.... I want to get the number of views of an posts(Articles). I created a field in the posts table, I want to add a value to the field every time the code is executed. As a result, I have to update the value of a field , By maintaining the previous value that exists in the database. i want update a field , By maintaining the previous value DB::table('posts')->where('id' , $id)->update($data);
  5. I want to add a value to the field, and keep the previous value in the field.How does it work? $data['count'] = 1; DB::table('posts')->where('id' , $id)->update($data);
  6. ok , thanks.... in MSDN web docs , Posted: So I can not use this method?
  7. hi ... i want use HTML DOM execCommand() Method in java script for create "Edit Text" but i have a problem, in website 'w3shools' , wrote this explanation: What is the meaning of this sentence? Is this method obsolete? https://www.w3schools.com/jsref/met_document_execcommand.asp
  8. I found the solution. for display the answer of the request in file blade.php , we can use this cod: controller public function GetSubCategory(){ return response()->json(['success' => 'ok']); } blade.php: <span id="test"></span> Document.getElementById('test').innerText=response.success
  9. i send Answer the request ajax to file blade.php : public function GetSubCategory($category_id){ $sub="test"; return response()->json($sub); } Now I want to display the answer of the request. How can I display it? (in file blade.php) i want display variable "$sub" in file blade.php
  10. hi . i use from this code for send request Ajax in laravel: function loadDoc() { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { // document.getElementById("demo").innerHTML = this.responseText; console.log(this); } }; xhttp.open("GET", "/get/subcategory/", true); xhttp.send(); } </script> route: Route::get('/get/subcategory/{category_id}',[PostController::class,'GetSubCategory']); controller: public function GetSubCategory($category_id){ $sub="test"; return response()->json($sub); } for receive request ajax in file blade.php , What command should I use? Thanks
  11. oh !! I Dont Use "()" ! The problem was solved! Thanks
  12. i use "save" for Update Fields in "Users" Table thanks . OK...I will explain complete... i use form Authentication system in laravel (Laravel Jetstream). when i add this package in laravel project , add A number migrations in project... i want Edit Table "Users" in this package...so i add How many Field in this thable: (In Previous article Sent Photo from This Table) mobile address gender image So , I decided Update "Users" Table With New Fields. For Update I use from This Syntax: https://laravel.com/docs/8.x/eloquent#updates
  13. What is wrong in line? thanks
  14. i want update one record of table in mysql....but my data , dont update and dont receive any Error message. $data=User::find(Auth::user()->id); //echo $date; $data->gender=$request->gender; $data->name=$request->username; $data->mobile=$request->mobile; $data->email=$request->email; $data->address=$request->address; $data->image=$request->image; $data->save; return redirect()->route('profile.view')->with('success',' User Updated successfuly'); code: I used this code for update , Have a Problem? thanks
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.