laravel 6 – I HAVE A VERY RARE PROBLEM Undefined Variable: users (View: C: New Folder sisbegn resources views users index.blade.php)

I am very confused, this appears to me Undefined Variable: User (View: C: New Folder sisbegn resources views users index.blade.php), which is the index.blade.php file of my users' view I am NOT working on this module, if not on my MATERIALS PARALLELS module
I get the error message when I click on the menu

Enter image description here

My user route is this

Route::resource('users', 'UserController');

and the route I work on is this

Route::resource('levels_subjects', 'LevelSubjectController');

I have this in the control of my users

get('searchText'));
        $users = DB::table('users as u')
        ->join('roles as r', 'u.rol_id', '=', 'r.rol_id')
        ->select('u.id', 'u.name', 'u.lastName', 'u.idCard', 'u.email', 'u.password', 'r.rol_name')
        ->where('u.name','LIKE','%'.$searchText.'%')
        ->orwhere('u.lastName','LIKE','%'.$searchText.'%')
        ->orwhere('u.idCard','LIKE','%'.$searchText.'%')
        ->orderBy('u.lastName','asc')
        ->paginate(7);

        return view('users.index', compact('users','searchText'));
    } 
}

public function create() {

    $roles = DB::table('roles')->where('rol_id', '>', '0')->get();
    return view("users.create", compact('roles'));
}

public function store(UserFormRequest $request) {
    $user = new User;
    $user -> rol_id = $request->get('rol_id');
    $user -> name = $request->get('name');
    $user -> lastName = $request->get('lastName');
    $user -> idCard = $request->get('idCard');
    $user -> email = $request->get('email');
    $user -> password = bcrypt($request->get('password'));
    $user -> save();
    return redirect(route('users.index'));
}

public function show($id) {
    return view('users.show',('user'=>User::findOrFail($id)));
}

public function edit($id) {
    $user = User::findOrFail($id);
    $roles = DB::table('roles')->where('rol_id', '>', '0')->get();
    return view('users.edit',("user"=>$user, "roles"=>$roles));

}

public function update(UserFormRequest $request, $id) {
    $user = User::findOrFail($id);
    $user -> rol_id = $request->get('rol_id');
    $user -> name = $request->get('name');
    $user -> lastName = $request->get('lastName');
    $user -> idCard = $request->get('idCard');
    $user -> email = $request->get('email');
    $user -> password = bcrypt($request->get('password'));
    $user -> update();
    return redirect(route('users.index'));
}

public function destroy($id) {

    $user = User::where('id', $id)->delete();
    Flash::success('Eliminado exitosamente.');
    return redirect(route('users.index'));
}

}

I have this in my user model

I have it in my index.blade.php file

                        
                            @foreach($users as $us)
                                
                                
                            @endforeach
                    
Nombres y Apellidos Cédula Email Rol Acciones
{!! $us->id !!} {!! $us->lastName !!} {!! $us->name !!} {!! $us->idCard !!} {!! $us->email !!} {!! $us->rol_name !!} {!! Form::open(('route' => ('users.destroy', $us->id), 'method' => 'delete')) !!}
Ver Editar {!! Form::button('Eliminar', ('type' => 'submit', 'class' => 'btn btn-danger', 'onclick' => "return confirm('Confirma que desea Eliminar?')")) !!}
{!! Form::close() !!}

Just in case I have this in my Matter Parallel Controller

get('searchText'));
        $levels_subjects = DB::table('levels_subjects as ls')
        ->join('levels as l', 'ls.lev_id', '=', 'l.lev_id')
        ->join('subjects as s', 'ls.sub_id', '=', 's.sub_id')
        ->join('periods as p', 'ls.per_id', '=', 'p.per_id')
        ->select('ls.lev_sub_id', 'l.lev_name', 's.sub_name', 'p.per_name') //'u.photo'
        ->where('s.sub_name','LIKE','%'.$query.'%')
        ->paginate(7);
        return view('users.index',("levels_subjects"=>$levels_subjects,"searchText"=>$query));
    } 
}

public function create() {
    $levels = DB::table('levels')->where('lev_id', '>', '0')->get();
    $subjects = DB::table('subjects')->where('sub_id', '>', '0')->get();
    $periods = DB::table('periods')->where('per_id', '>', '0')->get();
    return view("users.create", ("levels"=>$levels, "subjects"=>$subjects, "periods"=>$periods));
}

public function store(LevelSubjectFormRequest $request) {
    $levelsubject = new LevelSubject;
    $levelsubject -> lev_id = $request->get('lev_id');
    $levelsubject -> sub_id = $request->get('sub_id');
    $levelsubject -> per_id = $request->get('per_id');
    $levelsubject -> save();
    return redirect(route('levels_subjects.index'));
}

public function show($id) {
    return view('levels_subjects.show',('levelsubject'=>LevelSubject::findOrFail($id)));
}

public function edit($id) {
    $levels = DB::table('levels')->where('lev_id', '>', '0')->get();
    $subjects = DB::table('subjects')->where('sub_id', '>', '0')->get();
    $periods = DB::table('periods')->where('per_id', '>', '0')->get();
    return view("levels_subjects.create", ("levels"=>$levels, "subjects"=>$subjects, "periods"=>$periods));

}

public function update(LevelSubjectFormRequest $request, $id) {
    $levelsubject = LevelSubject::findOrFail($id);
    $levelsubject -> lev_id = $request->get('lev_id');
    $levelsubject -> sub_id = $request->get('sub_id');
    $levelsubject -> per_id = $request->get('per_id');


    $levelsubject -> update();
    return redirect(route('levels_subjects.index'));
}

public function destroy($id) {

    $levelsubject = LevelSubject::where('lev_sub_id', $id)->delete();
    Flash::success('Eliminado exitosamente.');
    return redirect(route('levels_subjects.index'));
}

}

As additional information, when I click on the USERS menu, it works well for me!
but if I click on MATTERS-PARALLELS, it fails. It is assumed that there is an error in some views of MATTERS-STOPPERS or in your controller. Please help ... I am new to this from Laravel.

Javascript – Why are arrays within an object in the API request with Axios undefined?

I have created an API that sends this information:

{ 
  title: 'algum título', 
  content: ('vários parágrafos')
}

The method that receives the data is as follows:

async componentDidMount() {
    let response = await axios.get("http://localhost:8000");
    let api = response.data;

    this.setState({ data: api });
  }

Both title and content are received correctly. I can see the data by logging, but the variable type is wrong.

console.log(typeof api.title) // string
console.log(typeof api.content) // undefined

To solve the case, I use the brackets. Only then can I use the map.

{this.state.data.title}

{(this.state.data.content).map(elem =>

{elem}

) }

The point is not that I can not solve the problem, but I would like to understand it. Understand why that happens.

Javascript prints 45 UNDEFINED LINES

can someone help me?

The script runs fine, but when it's done, undefined lines are still printed:
I have already tried to make some changes, but no success …
I really have no idea.

var events = (
  ("Blood Castle",("00:00","02:00","04:00","06:00","08:00","10:00","12:00","14:00","16:00","18:00","20:00","22:00")),
  ("Chaos Castle",("01:00","03:00","05:00","07:00","09:00","11:00","13:00","15:00","17:00","19:00","21:00","23:00")),
  ("Devil Square",("00:30","04:30","08:30","12:30","16:30","20:30")),
  ("Illusion Temple",("01:30","05:30","09:30","13:30","17:30","21:30")),
  ("CryWolf",(4,7),("20:30","20:30")),
);

var boss = (
  ("White Wizard",("00:50","04:50","08:50","12:50","16:50","20:50")),
  ("Golden Invasion",("12:30","13:35","15:35","16:30","17:35","19:30")),
  ("Respawn Kundun",("16:00")),
);

var eventsTime = (

);



function toSeconds(h, m, s) {
  return h * 3600 + m * 60 + s;
}

function DateUTC(offset) {
  var d = new Date();
  var utc = d.getTime() + (d.getTimezoneOffset() * 60000);
  return new Date(utc + (3600000 * offset));
}

function updateEventsTime(eventsTime, divId) {
  var d = DateUTC('-2');
  var time = toSeconds(d.getHours(), d.getMinutes(), d.getSeconds());
  
  var html = '';
  for (var i in eventsTime) {
    var line = eventsTime(i);
    
    if (line.length == 2 && typeof(line(1)) == 'object') {
      var j;
      for (j = 0; j < line(1).length; j++) {
        var t = line(1)(j);
        t = toSeconds(t(0), t(1), 0);
        
        if (t > time) {
          break;
        }
      }
      
      j = j % eventsTime(i)(1).length;
      var t = eventsTime(i)(1)(j);
      
      var diff = toSeconds(t(0), t(1), 0) - time;
      if (diff < 0) {
        diff += 3600 * 24;
      }
      
      var h = parseInt(diff / 3600);
      diff -= 3600 * h;
      var m = parseInt(diff / 60);
      var s = diff - m * 60;
      
      var countdown = h + ':' + ("0" + m).slice(-2) + ':' + ("0" + s).slice(-2);
      


      html += '
  • ' + line(0) + ': ' + countdown + '
  • '; } else if (line.length == 3) { var week = (0, 0, 0, 0, 0, 0, 0); var weekH = (0, 0, 0, 0, 0, 0, 0); for (j in line(1)) { var t = line(2)(j); t = toSeconds(t(0), t(1), 0); week(line(1)(j) - 1) = t; weekH(line(1)(j) - 1) = line(2)(j); } var dd = d.getDay(); var total = 0; while (1) { if (week(dd) && ((dd == d.getDay() && week(dd) > time) || dd != d.getDay())) { var w = ('', '', '', '', '', '', '')(dd); if (dd == d.getDay()) { w = ''; } var diff = (dd * 24 * 60 * 60 + week(dd)) - (d.getDay() * 24 * 60 * 60 + time); if (diff < 0) { diff += 7 * 24 * 60 * 60; } var days = parseInt(diff / (24 * 60 * 60)); diff -= days * (24 * 60 * 60); var h = parseInt(diff / 3600); diff -= 3600 * h; var m = parseInt(diff / 60); var s = diff - m * 60; if (days) { count = days + 'd ' + h + 'h'; } else { var count = h + ':' + ("0" + m).slice(-2) + ':' + ("0" + s).slice(-2); } html += '
  • ' + line(0) + ': ' + count + '
  • '; break; } if (total++ > 8) { html += '
  • ' + line(0) + ': 7d
  • '; break; } dd = (dd + 1) % 7; } } else { html += '
  • ' + line(0) + ': ' + line(1) + '
  • '; } } $('#' + divId).html(html); } setInterval(function () { updateEventsTime(events, 'c_events'); updateEventsTime(boss, 'c_boss'); }, 1000);

    and the result of this code:

    Picture here

    I also have one on the homepage, which calls the result.
    Can an expert take a look?

    Greetings,

    php – LARABLE ELOQUENT MYSQL ERROR Calling the undefined method Illuminate Database Eloquent Relations HasMany :: left () (View:

    I'm trying to sum the value of all results from a single field after looking for parameters, but I come across this mistake …

    Here is the controller:

    public function getSearch (Request $ request)
    {
    $ title = & # 39; Accounts Payable & # 39 ;;

        $grupos_lista = DB::table('planoconta')->where('CdConta', '=', '1')->orWhere('CdConta', '=', '2')->orderBy('CdConta','ASC')->get();
    
        $fornecedores = auth()->user()->fornecedores()->orderBy('NmRazao','ASC')->get();
    
        $situacao = auth()->user()->ctaspagar()->select('DsStatus')->where('DsStatus','<',2)->groupBy('DsStatus')->get();
    
        $search = $request;
    
        $busca = DB::table('ctaspagar');
    
        if (! is_null($request->datainicio) && ! is_null($request->datafim)) {
            $datainicio = Carbon::parse(($request->datainicio))->format('Y-m-d');
            $datafim = Carbon::parse(($request->datafim))->format('Y-m-d');
    
            $request->datas = ('inicio' => $datainicio, 'fim' => $datafim);
        }
    

    ——- This is the cause of the error in the variable $ sum

        $ctaspagar = auth()->user()->ctaspagar()->with('planoconta')->where('DsStatus','<',2)->when($request, function ($query, $search) {
            $query->when($search->fornecedores, function ($query, $search) {
                $query->where('fornecedor_id','=',"{$search}");
            })->when($search->nrnf, function ($query, $search) {
                $query->where('NrNF','=',"{$search}");
            })->when($search->datas, function ($query, $search) {
                $res = DB::raw("STR_TO_DATE(`DtPrev`, '%d/%m/%Y')");
                $query->whereBetween($res, ($search('inicio'), $search('fim')))->orderBy('id','ASC')->get();
            })->when($search->item, function ($query, $search) {
                $query->whereHas('planoconta', function($query) use($search) {
                    $query->where('planoconta.CdConta','=',"{$search}");
                 });
            })->when($search->situacao, function ($query, $search){
                $query->where('DsStatus','=',"{$search}");
            }); 
        });
    
        $soma = $ctaspagar->sum('VlPrev');
    
        $ctaspagar->Paginate(self::MIN_ROWS)->appends(('busca' => $request->busca , 'situacao' => $request->situacao , 
                                            'item' => $request->item , 'fornecedores' => $request->fornecedores , 
                                            'datainicio' => $request->datainicio , 'datafim' => $request->datafim , 
                                            'grupos_lista' => $request->grupos_lista));
    
            return view("financeiro.ctaspagar.index", compact('ctaspagar', 'title', 'soma', 'fornecedores', 'grupos_lista', 'busca', 'situacao'));
    
    }
    

    The view looks like this:

    VlPrev;
    ? ->


    I do not know how to do that. Can someone help me with tips?

    javascript – Uncaught TypeError: The property & # 39; input & # 39; from undefined can not be read

    I am new to the implementation of neural networks, so I am trying to create a new one, but I am getting this error …

    Enter image description here

    I was following this article https://www.freecodecamp.org/news/how-to-a-network-in-Javascript-to-30-lines-from-code-343dafc50d49/ step by step but without success …

    Let me show you my code.

    var inputLayer = new window.synaptic.Layer(2);
    var hiddenLayer = new window.synaptic.Layer(3);
    var outputLayer = new window.synaptic.Layer(1);
    
    inputLayer.project(hiddenLayer);
    hiddenLayer.project(outputLayer);
    
    var myNetwork = new window.synaptic.Network({
    input: inputLayer,
    hidden: (hiddenLayer),
    output: outputLayer
    });
    
    var learningRate = .15;
    //pegar o que a pessoa digitar, e contar o tempo que ela leva 
    //
    for (var i = 0; i < 2000000; i++) {  
      // 0,0 => 0  
      myNetwork.activate((15,20));  
      myNetwork.propagate(learningRate, (0));
      // 0,1 => 1  
      myNetwork.activate((25,25));  
      myNetwork.propagate(learningRate, (0));
    
      myNetwork.activate((90,10));  
      myNetwork.propagate(learningRate, (0));
    
      myNetwork.activate((80,15));  
      myNetwork.propagate(learningRate, (0));
    
      myNetwork.activate((20,20));  
      myNetwork.propagate(learningRate, (0));
    
      // 0,1 => 1  
      myNetwork.activate((30,28));  
      myNetwork.propagate(learningRate, (0));
    
      // 1,1 => 0  
      myNetwork.activate((31,19));  
      myNetwork.propagate(learningRate, (0));
    
      myNetwork.activate((30,18));  
      myNetwork.propagate(learningRate, (0));
    
      // 1,0 => 1  
      myNetwork.activate((40,35));  
      myNetwork.propagate(learningRate, (1));
    
      // 1,1 => 0  
      myNetwork.activate((70,60));  
      myNetwork.propagate(learningRate, (1));
    
      myNetwork.activate((60,58));  
      myNetwork.propagate(learningRate, (1));
    
      // 1,1 => 0  
      myNetwork.activate((65,59));  
      myNetwork.propagate(learningRate, (1));
    
      myNetwork.activate((50,51));  
      myNetwork.propagate(learningRate, (1));
    
      // 1,1 => 0  
      myNetwork.activate((52,53));  
      myNetwork.propagate(learningRate, (1));
    
      myNetwork.activate((15,90));  
      myNetwork.propagate(learningRate, (1));
    
      myNetwork.activate((80,60));  
      myNetwork.propagate(learningRate, (1));
    
    }
    
    
    
      
        
        
        
        Use EJS
        
        
        
      
      
        

    Could someone help me?

    Conditional return of a constant if the function returns Undefined

    Often functions can return Undefined in Mathematica, e.g. if the Volume@RegionIntersection is called for 2 objects that have no overlapping volume. A simple one If Instruction check if the return has indeed been Undefined does not seem to work. For example, a=Undefined; If(a == Undefined, Print("yes")) The command will eventually be printed by yourself.

    • How can we check if a variable (or a function) like a was assigned as Undefined and assign a different value in this case?

    vuejs – VUE2Js + AXIOS – Unattached TypeError: The property & # 39; create & # 39; from undefined can not be read

    I create an app with Vuejs and use Axios to access an API. At home I have no problem, but when I deploy in an AWS environment with Docker + Nginx, it's as if Axios no longer exists

    With the following error:

    main.js:18 Uncaught TypeError: Cannot read property 'create' of undefined
    

    The part of the main.js code is this

    import axios from 'axios'
    
    Vue.prototype.$backend = axios.create({baseURL : 'https://aqui va la url/'})
    

    I searched for many solutions, but I can not get out of the loop

    vue.js – Unbound (Promise) TypeError: The startsWith property of undefined can not be read

    In my nuxtjs project, I can not call my smart contract function in the for loop. When I try to call outside the for loop, it works fine. what do I do?

        let listOf  = this.contract
     const contractAddress =  await this.cont.methods.contracts(2).call({from: this.ethAddress})
      console.log("contract address in 2 index "+contractAddress) // it worrks
       await this.contract.methods.getContractcount().call({
       from: this.ethAddress},
       function(error, result)
       {
         if(!error)
         {
    
           var log = result
           console.log(log)
           var ContractList = async (log) =>
           {
              for(var i = 0; i

    My console error

    8d1bc033c0b40cc14af6.js:2 Uncaught (in promise) TypeError: Cannot read property 'startsWith' of undefined
    at Function.t.fromHexString (8d1bc033c0b40cc14af6.js:2)
    at t._callStaticAsync (8d1bc033c0b40cc14af6.js:2)
    at t. (8d1bc033c0b40cc14af6.js:2)
    at 8d1bc033c0b40cc14af6.js:2
    at Object.next (8d1bc033c0b40cc14af6.js:2)
    at 8d1bc033c0b40cc14af6.js:2
    at new Promise ()
    at Module.y (8d1bc033c0b40cc14af6.js:2)
    at t._ethCall (8d1bc033c0b40cc14af6.js:2)
    at t. (8d1bc033c0b40cc14af6.js:2)
    

    reactjs – Show array in React (property mapmap von of undefined can not be read)

    I'm trying to iterate through an array, but it gives me the error message "Property # map & # 39; can not be read from undefined". Can somebody help me with it? Thanks in advance.

    The Claims variable returns an array, I tried to convert it to json, and it did not work.

    Is there another way to go through it?

    greetings

    import React from "react";
    import PropTypes from "prop-types";
    import userStore from "../../stores/userStore";
    import * as userActions from "../../actions/userActions";
    import Header from "../common/Header";
    
    const ViewClaims = props => {
      const id = props.match.params.id;
      userActions.loadUserById(id);
      const user = userStore.getUserById();
      const claims = user.claims;
      console.log(claims);
      return (
        <>
          

    Users Claims

      {claims.map(claim => { return
    • {claim.type}
    • ; })}
    ); }; ViewClaims.propTypes = { match: PropTypes.object.isRequired, history: PropTypes.object.isRequired }; export default ViewClaims;
    DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123
    Proxy Sites Proxy Tunnels Proxy List Working Proxy Sites Hotproxysite Proxy Sites Proxy Sites Anonymous Proxy Anonymous Proxies Top-Proxies.co.uk http://www.proxysitesnow.com Proxy Servers Free Proxies Free Proxy List Proxy List Zoxy Proxy List PR liste all proxy sites More Proxies netgofree netgofree Hide-MyIp - The Best Proxy List American Proxy List www.proxylisty.com/proxylist Web Proxy Submit Proxies Updated Proxy List Updated Proxy List aproxy.org Bypass Proxy Sites Free Proxies List Evolving Critic Business Web Directory Free Proxy List iShortIt MyProxyList Online Proxies Go Proxies Need Proxies PrivateProxies Proxies4MySchool Proxies4Work Free Proxy List Free Proxy Sites ProxyInside Wiksa Proxy ProxyLister.org Free Proxy List ProxyNoid Proxy List Free Proxy List Proxy Sites Proxy TopList ProxyVille UK Proxy WebProxy List RatedProxy.com - Listing the best Web Proxies Free Proxy List SchoolProxiesList Stay Anonymous Proxy List The Power Of Ninja Proxy List UNubstruct Free proxy sites Free proxy sites