我正在尝试通过点击按钮删除某个类别,但却找不到我找到的页面。
public function ApagarPortfolio($id) {
$i = DB::table('portfolio')->where('id',$id)->delete();
if($i > 0) {
Session::flash('apagarportfolio', 'Portfolio removido com sucesso');
return Redirect::route('portfolio');
}
}
路线
Route::get('backend/portfolio/{$id}','BackendControlador@ApagarPortfolio');
索引
<a title="Apagar" href="{{URL::to('backend/portfolio/'.$portf->id) }}" style="color: white;">
<button class="btn
@if($portf -> genero == 'Web Design')
btn-success btn-sm"
@endif
data-widget="remove">
<i class="fa fa-times"></i>
</button>
</a>
答案 0 :(得分:2)
变化:
backend/portfolio/{id}
为:
-(BOOL) openAddCardForPaymentUIIfNeeded
{
if ( [PKPassLibrary isPassLibraryAvailable] )
{
if ( ![PKPaymentAuthorizationViewController canMakePaymentsUsingNetworks:[NSArray arrayWithObjects: PKPaymentNetworkAmex, PKPaymentNetworkMasterCard, PKPaymentNetworkVisa, nil]] )
{
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Add a Credit Card to Wallet" message:@"Would you like to add a credit card to your wallet now?" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
[alert show];
return true;
}
}
return false;
}