Category : api

I’m looking for a product search function for an online shop and getting the products details of 1688.com using the product url and get the result on my custom page using php, javascript or laravel codes, any clue or available code? What Have Tried: below is the index.php code <div class=”slogan”> <form action=”/product.php” method=”get” target=”_blank”> ..

Read more

in Laravel 8, how to make a status field with "failed" value, on unsuccessfull validation of data? The part that I cannot seem to extend, nor catch, that generates the response (which doesn’t have the success field in it) is: trait RegistersUsers { public function register(Request $request) { $this->validator($request->all())->validate(); … The response has this form: ..

Read more

Anybody have worked with https://www.twilio.com/docs/conversations/quickstart#create-your-first-conversation in the Laravel Framework.. Please can you share me their work here because I have reading Twilio Documentation for Conversation API for programmable chat but I have not real concept that How can I work in Laravel Application for a real time chat.. I want a chat boot on the ..

Read more

I have a curriculum table and a table of content_texts, content_files, content_videos and quizzes. All of the tables are related to curriculum tables with one to many, where one curriculum has many content_texts, content_files, content_videos and quizzes. The problem is, when I fill in all the content_texts, content_files, content_videos and quizzes tables and I join ..

Read more

I am trying to install noitran/opendox using composer require noitran/opendox But it can’t install and showing the error message: Problem 1 – illuminate/routing[v5.7.0, …, 5.8.x-dev] require php ^7.1.3 -> your php version (8.0.1) does not satisfy that requirement. – noitran/opendox v0.1.0 requires illuminate/routing ~5.7 -> satisfiable by illuminate/routing[v5.7.0, …, 5.8.x-dev]. – Root composer.json requires noitran/opendox ..

Read more

i am developing flutter auth system using laravel passport. But there is a problem i want try to logout. Here is my logout button in flutter : Center( child: RaisedButton( elevation: 10, onPressed: (){ logout(); }, color: Colors.teal, shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))), child: Text(‘Logout’), ), ), void logout() async{ var res = await Network().getData(‘/logout’); var body ..

Read more

In my Laravel-8 application, I am building Users API: In the users model, I have this relations: public function company() { return $this->belongsTo(‘AppModelsOrganizationOrgCompany’); } public function employee(){ return $this->hasOne(HrEmployee::class, ‘user_id’); } While in Employee relationship I have: public function gradelevel() { return $this->belongsTo(‘AppModelsHrHrGradeLevel’,’grade_level_id’,’id’); } public function department() { return $this->belongsTo(‘AppModelsHrHrDepartment’,’department_id’,’id’); } Then my Controller looks ..

Read more

i am trying to delete the record using api . my api routes are defined as follow in the api.php file Route::resource(‘/basic’, ‘basicCotroller’); while making the controller i mistakenly typed Cotroller but the thing is controller is working fine. +——–+———–+————————+—————+———————————————+————–+ | Domain | Method | URI | Name | Action | Middleware | +——–+———–+————————+—————+———————————————+————–+ | ..

Read more

Issue after the Auth::attempt function passes, there is no data returned via the api its a blank response. but if I run the same request via Postman I get the following response (with wrong email/password) {"status":403,"message":"Incorrect login details"} with the correct email/password I get this {"status":200,"message":"User logged in"} Code and Stuff Laraval Code (Routes) Route::post(‘/api/v1/login’, ..

Read more

I am using laravel 8. I want to send a notification SMS through nexmo when user register, but it doesn’t work. It says Swift_TransportException Cannot send message without a sender address. I cannot find the solution for nexmo mobile. How to solve this problem in laravel 8. UserController.php public function registerUser(Request $request) { if ($request->isMethod(‘post’)) ..

Read more

I am using laravel 8. I want to send a notification SMS through nexmo when user register, but it doesn’t work. It says Swift_TransportException Cannot send message without a sender address. I cannot find the solution for nexmo mobile. How to solve this problem in laravel 8. UserController.php public function registerUser(Request $request) { if ($request->isMethod(‘post’)) ..

Read more

I want to separate the CourseLectureResource response and the CourseQuizResource response on one function, namely the store function in CourseController, how to separate the two, I’ve tried using if else but it hasn’t worked. This is my Course model `<?PHP namespace AppModels; use IlluminateDatabaseEloquentModel; use IlluminateSupportFacadesDB; class Course extends Model { protected $table = ‘courses’; ..

Read more

I have the JSON payload below and want to get names and ids from the payload with json decode. However, l cannot get object names and ids from the payload. Decode JSON $result = json_decode($resp->getBody()->getContents(), true); return response()->json( [ "code" => 200, "message" => "OK", "payload"=> $result[‘payload’] ?? ”, ]); Api json payloads { "code": ..

Read more