即使我做了正确的程序,我也无法获得删除功能的警报,所以请帮我一样。提前解决我的问题。 即使我做了正确的程序,我也无法获得删除功能的警报,所以请帮助我同样的事。谢谢你提前解决我的问题
'auth.basic.once' => \App\Http\Middleware\AuthenticateOnceWithBasicAuth::class,
namespace App\Http\Middleware;
use Closure;
//use Auth;
use Illuminate\Support\Facades\Auth;
class AuthenticateOnceWithBasicAuth
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
return Auth::onceBasic() ?: $next($request);
}
}
答案 0 :(得分:1)
每个控制器都应注册为Angular应用程序的一部分。您已注册DbController
,但随后创建了一个名为DbController
的单独函数,Angular不知道该函数。尝试将删除功能移动到已注册的控制器。像这样:
crudApp.controller("DbController", ['$scope', '$http', function ($scope, $http) {
// Sending request to EmpDetails.php files
getInfo();
function getInfo() {
$http.post('select.php').success(function (data) {
// Stored the returned data into scope
$scope.details = data;
console.log(data);
});
}
$scope.deleteInfo = function () {
alert("hello");
}
}