我正在使用Laravel 5.4制作简单的 API,但我遇到了问题。我创建了路由和一些用于测试的数据,但是当我通过放置localhost:8888/{projectname}/api/v1/meeting它来测试路由是否与 Postman 正常工作时,它会显示我error 404 page not found。我究竟做错了什么?
路线/api.php
<?php
Route::group(['prefix' => 'v1'], function() {
Route::resource('meeting', 'MeetingController', [
'except' => ['edit', 'create']
]);
Route::resource('meeting/registration', 'RegistrationController', [
'only' => ['store', 'destroy']
]);
Route::post('user', [
'uses' => 'AuthController@store'
]);
Route::post('user/signin', [
'uses' => 'AuthController@signin'
]);
});
Run Code Online (Sandbox Code Playgroud)
会议控制器
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
class MeetingController extends Controller
{
public function __construct()
{
// $this->middleware('name');
}
public function index()
{
return …Run Code Online (Sandbox Code Playgroud) 我正在 Xamarin Android 中创建自己的日历,基于本教程。我将所有需要的东西从 Java 转换为 C#,但是现在当我启动应用程序并打开包含自定义日历的片段时:
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
var view = inflater.Inflate(Resource.Layout.calendar_fragment_main, container, false); //System.NotSupportedException Error
return view;
}
Run Code Online (Sandbox Code Playgroud)
我收到一条错误消息:
System.NotSupportedException - 无法将 Java 类型 'md57f15d2d0137b5b5d70f719ce3cee21d4/EstiCalendar' 的 JNI 句柄 0xffcdb7e8 (key_handle 0x741b240) 激活为托管类型 'EstiMOBILE.EroidCalendars.EroidsCalendars.D
以及其他 2 个可能来自第一个错误的错误:
Java.Lang.UnsupportedOperationException - 二进制 XML 文件第 1 行:您必须提供 layout_width 属性。
Android.Views.InflateException - 二进制 XML 文件第 1 行:二进制 XML 文件第 1 行:您必须提供 layout_width 属性。
包含自定义日历的片段 ( calendar_fragment_main.axml ):
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:esticalendar="http://schemas.android.com/apk/res-auto" …Run Code Online (Sandbox Code Playgroud) 我在laravel 4.2中工作,我想在我的应用程序中实现Vue.js.当我在我的刀片中放入一些测试代码时,它只显示错误"使用未定义的常量消息 - 假设'消息'"我知道laravel读取{{message}}就像php代码一样但你知道如何添加vue的任何解决方案.我的刀片?感谢帮助.这是代码
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.4/vue.js"></script>
<script>
new Vue({
el: '#app',
data: {
message: 'hello from Vue.js 2.0'
}
})
</script>
<div id="app">
<p>{{ message }}</p>
</div>
Run Code Online (Sandbox Code Playgroud)