我正在尝试从其官方文档中学习laravel数据库队列.我已完成文档中给出的配置.
在这里我的工作:
<?php
namespace App\Jobs;
use App\SearchLog;
use App\Jobs\Job;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Bus\SelfHandling;
use Illuminate\Contracts\Queue\ShouldQueue;
class SendTicket extends Job implements SelfHandling, ShouldQueue
{
use InteractsWithQueue, SerializesModels;
protected $log;
protected $searchLog = array();
public function __construct(SearchLog $log , $data = array())
{
$this->log = $log;
$this->searchLog = $data;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$this->log->create($this->searchLog);
}
Run Code Online (Sandbox Code Playgroud)
在我的控制器中,我这样打电话
public function store(Request $request)
{
$searchLog = array();
// searchLog contains the data …Run Code Online (Sandbox Code Playgroud) 有什么区别
<a href=" {{ URL::route('/account/register') }}" >Register 1 </a>
Run Code Online (Sandbox Code Playgroud)
和
<a href=" {{ URL::to('/account/register') }}" >Register 2 </a>
Run Code Online (Sandbox Code Playgroud)
我将routes.php定义为
Route::get('/account/register','RegisterController@create');
Run Code Online (Sandbox Code Playgroud)
当我点击'Register 1'时出现以下错误
Route [/account/register] not defined.
Run Code Online (Sandbox Code Playgroud)
但是,当我点击"注册2"时,它会进入
RegisterController@create
Run Code Online (Sandbox Code Playgroud) 这件事让我烦恼不已.我收到了这个解析错误: syntax error, unexpected ':', expecting ',' or ';' in /opt/lampp/htdocs/pratice/storage/framework/views/36f62563d0e17e05a5f15bec012dd0cd at line 21
我的视图文件是
@extends('layouts.loginlayout')
@section('content')
@if (session('status'))
<div class="alert alert-success">
{!! session('status') !!}
</div>
@endif
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> There were some problems with your input.<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{!! $error !!}</li>
@endforeach
</ul>
</div>
@endif
//this is line 21
{!! Form:open() !!}
<div class="form-group">
{!! Form::label('email','Email:') !!}
{!! Form::text('email',null,['class'=>'form-control','id'=>'email']) !!}
</div>
{!! Form::submit('Login',['class'=>'btn pull-right default-button']) !!}
{!! Form:close() !!}
@endsection
Run Code Online (Sandbox Code Playgroud) 我正在使用soap api在php中开发web应用程序.我有xml format as shown below把请求发送到api但是我在查看xml时遇到了像元素companyname上不允许Trailing solidus这样的错误postman.
<OTA_AirLowFareSearchRQ xmlns="http://www.opentravel.org/OTA/2003/05" ResponseType="OTA" ResponseVersion="1.9.2" Version="1.9.2" AvailableFlightsOnly="true">
<POS>
<Source PseudoCityCode="PCC">
<RequestorID ID="1" Type="1">
<CompanyName Code="TN" />
</RequestorID>
</Source>
</POS>
<OriginDestinationInformation RPH="1">
<DepartureDateTime>2016-03-15T11:00:00</DepartureDateTime>
<OriginLocation LocationCode="KTM"/>
<DestinationLocation LocationCode="DEL"/>
<TPA_Extensions>
<SegmentType Code="O"/>
</TPA_Extensions>
</OriginDestinationInformation>
<TravelPreferences ValidInterlineTicket="true">
<CabinPref PreferLevel="Preferred" Cabin="Y" />
<TPA_Extensions>
<TripType Value="Return" />
<LongConnectTime Min="780" Max="1200" Enable="true" />
<ExcludeCallDirectCarriers Enabled="true" />
</TPA_Extensions>
</TravelPreferences>
<TravelerInfoSummary>
<SeatsRequested>3</SeatsRequested>
<AirTravelerAvail>
<PassengerTypeQuantity Code="ADT" Quantity="2" />
<PassengerTypeQuantity Code="CHD" Quantity="1" />
</AirTravelerAvail>
</TravelerInfoSummary>
<TPA_Extensions>
<IntelliSellTransaction>
<RequestType Name="50ITINS" …Run Code Online (Sandbox Code Playgroud) 我真的希望有人能帮助我解决这个问题,这让我发疯又让我沮丧。我已在离线测试网站上安装了 WooCommerce,默认主题为 (TwentyThirteen),它工作正常且看起来很棒。
然而,当将其应用到我开发的主题时,效果很好。所有 woocommerce 样式已加载,但 woocommerce javascript 文件未加载。我使用了其他一些 woocommerce 插件,其 js 文件也未加载。但是,当我使用 TwentyThirteen 主题时,一切正常,并且所有 woocommerce 样式和 javascript 文件均已加载,但当应用于我的主题时,仅加载样式文件
我已经尝试了 WooCommerce 网站上的所有说明,将其集成到我的主题中(使用捕获所有页面或添加挂钩的两种方法),所有这些仍然有效。