skip to Main Content

Laravel – Axios response returns HTML

I have a problem in getting some data in my database. It returns HTML data. {data: '<!DOCTYPE html>n<html lang="en">n <head>n …>n x3Cscript src="/js/app.js">x3C/script>n</html>n', status: 200, statusText: 'OK', headers: AxiosHeaders, config: {…},…} And I am only requesting an authenticated user's username.…

VIEW QUESTION

Override last() method in laravel

I have one to many relations In my User Model public function user_balances(){ return $this->hasMany(UserBalances::class); } In my User Balances Model public function user(){ return $this->belongsTo(UserBalances::class); } So every time I want to retrieve the last record of user balance,…

VIEW QUESTION

Laravel – User model not found in trait

I have made an API and a trait with a function to handle responses. namespace AppTraits; use AppModelsUser; use AppModelsDiseases; use AppModelsExaminations; use AppModelsRec_Doc; use AppHttpResourcesfailter; trait ApiTraits { public function apiGet($id = null, $table) { if ($table::find($id)) { $status…

VIEW QUESTION

Laravel Backpack Filters doesnt do anything after click

Im new to Laravel Packpack. My issue is I have filters using this code $this->crud->addFilter( ['name' => 'created_at', 'type' => 'date_range', 'label' => 'Bid Date'], false, function ($value) { $dates = json_decode($value); $this->crud->addClause('where', 'created_at', '>=', $dates->from); $this->crud->addClause('where', 'created_at', '<=', $dates->to…

VIEW QUESTION
Back To Top
Search