Jump to content

ali_254

Members
  • Posts

    97
  • Joined

  • Last visited

Everything posted by ali_254

  1. thanks ... i found solution... for use nusoap in codeigniter 4 . download nusoap from github: https://github.com/f00b4r/nusoap and install nusoap with composer , According to the description on the github page. for use nusoap in controller , register this code:
  2. I want to use soap in codeigniter 4. i download file "nusoap.php" And put it next to the project. require_once(APPPATH.'Controllers\Payment\lib\nusoap.php'); $soapclient = new soapclient('https://verify.sep.ir/Payments/ReferencePayment.asmx?WSDL'); when run project , I receive error 'soapclient not found' Please help me, how can use soap in codeigniter 4.thanks
  3. 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
  4. thanks... we can use from this cod: DB::table('posts') ->where('id' , $id) ->increment('counter', 1);
  5. 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
  6. 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);
  7. 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);
  8. ok , thanks.... in MSDN web docs , Posted: So I can not use this method?
  9. 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
  10. 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
  11. 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
  12. 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
  13. oh !! I Dont Use "()" ! The problem was solved! Thanks
  14. 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
  15. What is wrong in line? thanks
  16. 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
  17. hi,i use Authentication system and want Update record of User is" loggen in" .i use this code $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'); but dont update this record and dont receive any Error. please guide me
  18. hi , i install "Laravel Jetstream" . this package insert many file in project... for example add this files: login.blade.php register.blade.php in login.blade.php , This code exists by default: <form method="POST" action="{{ route('login') }}"> but , in file web.php , i dont find this route, i only found this code: Route::middleware(['auth:sanctum', 'verified'])->get('/dashboard', function () { return view('dashboard',compact('users')); })->name('dashboard'); "{{ route('login') }}" , Where does it refer?
  19. i found problem! in "config/jetstream.php" , must edit this code: 'features' => [ // Features::termsAndPrivacyPolicy(), Features::profilePhotos(), // Features::api(), // Features::teams(['invitations' => true]), Features::accountDeletion(), ],
  20. hi.... i install Jetstream package with success but there is a problem in this package.. https://jetstream.laravel.com/2.x/features/authentication.html my profile dont have photo...And consequently, it is not possible to change the photo, what is the problem? thanks
  21. in method action in form , i use post methode , so , for Received method in route or controller , i use post method , Just like PHP,it's true?
  22. i use from login system in laravel , so , when login to system , redirect to "home page": http://127.0.0.1:8000/home when in taskbar type this address , program work with success. http://127.0.0.1:8000/test but , when type this address: receive Error http://127.0.0.1:8000/test2/
  23. in view file , i use post method: <form action="/test2" method="post"> {{csrf_field()}} <input type="text" name="title" id="title"> <br> <input type="text" name="title2" id="title2"> <br> <input type="text" name="title3" id="title3"> <input type="submit" value="register"> </form> in route , use post method: <?php use Illuminate\Support\Facades\Route; use App\Http\Controllers\Homecontroller; Route::get('/test', [Homecontroller::class, 'index2']); Route::post('/test2', [Homecontroller::class, 'index3']); //Route::get('/test', function () { // return view('test'); //}); Auth::routes(); Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home'); Auth::routes(); Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home'); controller file: <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Models\Company; use App\Models\Customer; class HomeController extends Controller { /** * Create a new controller instance. * * @return void */ public function __construct() { $this->middleware('auth'); } /** * Show the application dashboard. * * @return \Illuminate\Contracts\Support\Renderable */ public function index() { return view('home'); } public function index3(Request $request){ $a=$request->post("title"); echo $a . "</br>"; $a2=$request->post("title2"); echo $a2 . "</br>"; $a3=$request->post("title3"); echo $a3 . "</br>"; $validated = $request->validate([ 'title' => 'required', 'title2' => 'required', ]); return view('test2'); } public function index2() { $data1 = Company::all(); // dd($data1->customers); // return view('test',compact('companies')); foreach ($data1 as $row) { foreach ($row->customers as $row1) { echo $row->name . "__________ "; echo $row->created_at . "__________ "; echo $row->address . "__________ "; echo $row->title . "__________ "; echo $row->test . "__________ "; echo $row1->id . "<br>"; } } } } i dont use get method in MVC
  24. i active Authentication system(Login) in my project... Is there a relationship between this error and the login system? i dont use from javascript in my project... Is my code system for designing validation correct?
×
×
  • 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.