小编Nik*_*kki的帖子

laravel 中判断表是否为空

我试图查明我的表是否为空,但出现此错误

调用未定义函数 App\Http\Controllers\isEmpty()

我确实检查了与我的标题相似的问题,但没有我需要的内容。

这是我的代码

$orders = Order::all();

if(isEmpty($orders))
{
    echo "Im empty";
    die();
 }else{
    echo "im not empty";
     die();
 }
Run Code Online (Sandbox Code Playgroud)

laravel

4
推荐指数
2
解决办法
2万
查看次数

Vue 组件未显示在 Laravel 中

我的 vue 组件没有出现,我也看不到哪里出错了,我希望另一双眼睛可以指出我哪里出错了。我正在运行 npm run watch 并且我已经清除了我的缓存。

我的 app.js

/**
 * First we will load all of this project's JavaScript dependencies which
 * includes Vue and other libraries. It is a great starting point when
 * building robust, powerful web applications using Vue and Laravel.
 */

require('./bootstrap');

window.Vue = require('vue');

/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize …
Run Code Online (Sandbox Code Playgroud)

javascript laravel vue.js vue-component vuejs2

3
推荐指数
1
解决办法
8569
查看次数

标签 统计

laravel ×2

javascript ×1

vue-component ×1

vue.js ×1

vuejs2 ×1